Where are cron logs stored on Ubuntu 14.04?

As default, cron's logs saved in /var/log/syslog.
It depends on rsyslogd configuration. You can change it:
Go to rsyslog config

cd /etc/rsyslog.d/

sudo nano 50-default.conf

Uncoment line:

#cron.*                         /var/log/cron.log

Save file and restart rsyslog

sudo service rsyslog restart

Restart your cron daemon for get it's messages from new file

sudo service cron restart


grub2-common : Breaks: shim (< 13) but 0.9+1474479173.6c180c6-1ubuntu1 is installed

It's saying there is a problem with the shim package. This command:

sudo rm /var/cache/apt/archives/shim_13-0ubuntu2_amd64.deb

will remove the current version of the package.

Then purge any remnants of past installs of shim, update apt's caches and reinstall:

sudo apt purge shim; sudo apt update; sudo apt install shim


How can I install Dev C++ in Ubuntu 16.04

Dev-c++ is basically a Windows program, with some work done to port to Unix like environments (cygnwin, Linux, etc).  Run it under wine if you like, it's rated by winehq as silver or platinum, depending upon which version you select.


Does ClipIT help to track data's source and destination?

Two simple answers:

No and … no.

The reason, it makes no sense to save these additionally information in a clipboard manager.


Is there a way to take a screenshot of your log-in screen on startup?

Modify the file /etc/gdm/Init/Default, by adding the following line

(sleep 10; gnome-screenshot) &

just before the last exit 0 line. Then logout and wait 10 seconds for the interactive screenshot dialog to appear.

It propose the /tmp directory to save the image, in any case take attention to where you save the file, to found it later, after login.

Remember to remove the line inserted in the file /etc/gdm/Init/Default to remove this annoying screenshot dialog every time you login :)


Ubuntu Phone: Sending messages to multiple contacts over messaging-app

If you type in the To field of a new message it will suggest matching contacts and you can tap to select one. Then you can type another name in the same To field and so on.


syntax error near unexpected token `(' in .bashrc

You have unquoted spaces in your value to be assigned. bash uses spaces to tell where one parameter ends and the next starts, and treats parenthesis ("()") as special. Thus,

  export PATH=/bin/lscript:/bin/lscript:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Program Files/WindowsApps/CanonicalGroupLimited.UbuntuonWindows_1804.2019.521.0_x64__79rhkp1fndgsc:/mnt/c/Program Files (x86)/Common Files/Oracle/Java/javapath:/mnt/c/ProgramData/Oracle/Java/javapath:/mnt/c/Program Files (x86)/Intel/TXE Components/iCLS/:/mnt/c/Program Files/Intel/TXE Components/iCLS/:/mnt/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/mnt/c/WINDOWS/System32/Window`sPowerShell/v1.0/:/mnt/c/Program Files/Intel/TXE Components/DAL/:/mnt/c/Program Files (x86)/Intel/TXE Components/DAL/:/mnt/c/Program Files/Intel/TXE Components/IPT/:/mnt/c/Program Files (x86)/Intel/TXE Components/IPT/:/mnt/c/Program Files/Intel/WiFi/bin/:/mnt/c/Program Files/Common Files/Intel/WirelessCommon/:/mnt/c/Program Files (x86)/GtkSharp/2.12/bin:/mnt/c/WINDOWS/System32/OpenSSH/:/mnt/c/Program Files (x86)/QuickTime/QTSystem/:/mnt/c/Program Files/PuTTY/:/mnt/c/Program Files/Git/cmd:/mnt/c/Program Files/Git/mingw64/bin:/mnt/c/Program Files/Git/usr/bin:/mnt/c/Users/User/AppData/Local/Microsoft/WindowsApps:/snap/bin

looks like 32 parameters to bash's assignment.

There are two solutions:

Escape each space or parenthesis with \.
Quote (" or ') each space-containing parameter.

Here's what using the first method gives:

export PATH=/bin/lscript:/bin/lscript:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Program\ Files/WindowsApps/CanonicalGroupLimited.UbuntuonWindows_1804.2019.521.0_x64__79rhkp1fndgsc:/mnt/c/Program\ Files\ \(x86\)/Common\ Files/Oracle/Java/javapath:/mnt/c/ProgramData/Oracle/Java/javapath:/mnt/c/Program\ Files\ \(x86\)/Intel/TXE\ Components/iCLS/:/mnt/c/Program\ Files/Intel/TXE\ Components/iCLS/:/mnt/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/:/mnt/c/Program\ Files/Intel/TXE\ Components/DAL/:/mnt/c/Program\ Files\ \(x86\)/Intel/TXE\ Components/DAL/:/mnt/c/Program\ Files/Intel/TXE\ Components/IPT/:/mnt/c/Program\ Files\ \(x86\)/Intel/TXE\ Components/IPT/:/mnt/c/Program\ Files/Intel/WiFi/bin/:/mnt/c/Program\ Files/Common\ Files/Intel/WirelessCommon/:/mnt/c/Program\ Files\ \(x86\)/GtkSharp/2.12/bin:/mnt/c/WINDOWS/System32/OpenSSH/:/mnt/c/Program\ Files\ \(x86\)/QuickTime/QTSystem/:/mnt/c/Program\ Files/PuTTY/:/mnt/c/Program\ Files/Git/cmd:/mnt/c/Program\ Files/Git/mingw64/bin:/mnt/c/Program\ Files/Git/usr/bin:/mnt/c/Users/User/AppData/Local/Microsoft/WindowsApps:/snap/bin

And, for the second method,

export PATH=/bin/lscript:/bin/lscript:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:"/mnt/c/Program Files/WindowsApps/CanonicalGroupLimited.UbuntuonWindows_1804.2019.521.0_x64__79rhkp1fndgsc":"/mnt/c/Program Files (x86)/Common Files/Oracle/Java/javapath":/mnt/c/ProgramData/Oracle/Java/javapath:"/mnt/c/Program Files (x86)/Intel/TXE Components/iCLS/":"/mnt/c/Program Files/Intel/TXE Components/iCLS/":/mnt/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/:"/mnt/c/Program Files/Intel/TXE Components/DAL/":"/mnt/c/Program Files (x86)/Intel/TXE Components/DAL/":"/mnt/c/Program Files/Intel/TXE Components/IPT/":"/mnt/c/Program Files (x86)/Intel/TXE Components/IPT/":"/mnt/c/Program Files/Intel/WiFi/bin/":"/mnt/c/Program Files/Common Files/Intel/WirelessCommon/":"/mnt/c/Program Files (x86)/GtkSharp/2.12/bin":/mnt/c/WINDOWS/System32/OpenSSH/:"/mnt/c/Program Files (x86)/QuickTime/QTSystem/":"/mnt/c/Program Files/PuTTY/":"/mnt/c/Program Files/Git/cmd":"/mnt/c/Program Files/Git/mingw64/bin":"/mnt/c/Program Files/Git/usr/bin":/mnt/c/Users/User/AppData/Local/Microsoft/WindowsApps:/snap/bin


Try quitting from (or killing) the CD Creator software, then ejecting and reinserting the burnt CD and see if the data is on it or not.

I am having problems with k3b (a different burning program) at the moment where it tells me the burn has failed, but when I check the logs I see it failed after the process was 100% complete, and when I check what is on the CD it is all there.


boot hangs and needs manual 'lvm vgchange -ay'

Good news, it is fixed with 16.10.  I actually didn't reboot since posting the question (and the power grid here in Illinois stayed up that long...)

With today's (belated) upgrade to 16.10, I also re-read a few threads on the internet.  The long bug report thread about the issue at Debian bug report #616689 contains this recommendation somewhere further down:

cat /boot/grub/device.map
sudo grub-mkdevicemap
cat /boot/grub/device.map

and I think this mattered.  The first cat showed two entries corresponding to an old setup with my initial two drives. One of those dies and was replaced (yay, lvm saved the day there andmade that easy!)
but the entry never was updated.  Running grub-mkdevicemap may have fixed it.

In any event, no more manually attended reboots with 16.10.


Setting in Pulse Audio Volume Control:

Open Pulse Audio Volume Control > Configuration tab > Built-in Audio - Profile: Analog Stereo Duplex


There is no "Suspend & Power Button" option in Settings > Power menu

I have the same issue running:
Ubuntu 20.10
64-bit
GNOME 3.38.1
Nothing shows up under Settings>Power>Suspend & Power Button
I used this to disable sleep
sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target

and this to enable it again
sudo systemctl unmask sleep.target suspend.target hibernate.target hybrid-sleep.target


Why dpkg-reconfigure is trying to reconfigure packages which are not installed?

Is it perhaps configured, but not installed?

Can I see the output of:

$ dpkg -l glib-networking-services

Please?


Boot the live cd/usb stick. Open gparted (its on the disk) and inspect the harddrive. How many partitions does is have? If you have 1 HDD than I suggest using sda for boot. It should integrate Ubuntu with OSX in the bootloader.


See here - the TeXLive installed via PPA most likely (I don't use Ubuntu) does not contain tlmgr. If you need tlmgr, install TL2012 directly.


How to set up a DLNA server on Ubuntu 14.04?

The simple way is to use MiniDLNA, because it should be on Ubuntu repositories and it is a simple tool.

You can try all DLNA apps and still your TV is not going to run some file types. You need to check what type of files your capable DLNA TV support.

I recommend you to check the Community Wiki entry on how to configure MiniDLNA or watch an instructional video. Very simple and straight forward.

For MiniDLNA follow these steps:

Install MiniDLNA

sudo apt-get install minidlna

Edit configuration file

gksu gedit /etc/minidlna.conf

Add the following text to the file. Replace the folders name by the ones you use. You can just use one type if you want.

inotify=yes
media_dir=P,/home/user/Pictures
media_dir=V,/home/user/Videos
media_dir=A,/home/user/Music
media_dir=/home/user/Videos
friendly_name=UbuntuDLNA

Then restart the service to apply changes

sudo service minidlna restart

Make sure the file list is rebuild

sudo service minidlna force-reload


Booting ubuntu-20.04-desktop-amd64 from stick on my win10 notebook fails

Remake a different Ubuntu version LiveUSB for testing on that USB Flash drive.

Get an ISO file for a supported 'flavour' of 20.04 with a different Desktop (not the standard Ubuntu GNOME). Download @  https://ubuntu.com/download/flavours .

The ISO used to make a LiveUSB should be checked for download errors as per Canonical's instructions.

Make it following Canonical's (Ubuntu's publishers) instructions on Ubuntu, on a Windows PC  or on a Mac.

Once you remake the LiveUSB, boot from it, and see if the problem still occurs.


Ubuntu 18.04.5: Slow boot without ethernet

Try editing you /etc/network/interfaces file and changing this line "auto enp3s0" to "manual enp3s0". This should tell the system that, when you want to use this interface that you will manually up/down it, and during boot it shouldn't wait for and confirm that the interface is up.


How to edit PATH in order to change path of a directory?

If you want to add it to the path ...

export ANDROID_HOME=~/android/sdk/
export PATH=${PATH}:$ANDROID_HOME/:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools

If you want to replace tools and platform-tools by it ...

export ANDROID_HOME=~/android/sdk/
export PATH=${PATH}:$ANDROID_HOME

In both versions it is added at the end of your $PATH. I assume the / missing in the last part of your question is a typo.

You need to add that to ~/.profile (or ~/.bash_profile if you do not care about other shells than bash).


New Login keychain created at each login

I was having the same problem for a while. Here's how I finally fixed it.

First, open seahorse and create a new keyring, I called mine Extra, and copy anything you absolutely need to keep into that keyring.

Next, log out and drop to a VT (Ctrl+Alt+F2). Log in, and then cd .local/share/keyrings/. ls to see what keyring files are available, then rm login* default or otherwise remove all of the login keyrings, and the default file.

Log back in and everything should behave as normal except that you will need to re-authenticate all of your Online Accounts. If you use Google Chrome/Chromium next time it turns on it will sync all of its passwords back into the keyring as well.

tl;dr rm .local/share/keyrings/{login*,default} while not running GNOME/Unity.


Nearly every IRC client supports (at least partial) DCC.

Here are my picks from linux clients-

irssi
x-chat

See http://en.wikipedia.org/wiki/Comparison_of_Internet_Relay_Chat_clients#Direct_Client-to-Client_.28DCC.29_support


Camera devices suddenly disappeared on ubuntu 20.04

You can try doing a hard reset.

Long press the power button (say 10+ secs) until your system is off.
Repeat step one until you see your computer come on (continue to hold power button) and goes back off.
Then turn on your computer normally.

See if problem persists.
If that does not fix it, alternatively, check if there's a problem with the Camera drivers and repair accordingly.


Deleted sources.list.d and sources.list in "/etc/apt" accidentally

First, recover your source.list. If you can remember where can you find the lists in source.list.d, download or copy lists then put them into source.list.d.


How can I put some separators between unity launcher icons?

Just create launcher

gksudo gedit /usr/share/applications/separator.desktop

and paste following details in gedit.

[Desktop Entry]
Type=Application
Icon=/path/to/icon.png
Name=Unity Separator

then hit Super and search for Unity Separator and put it on Unity Panel
Remember, It will consume same space as of other launcher size on Unity Panel.


How to find what my custom command line command refers to

You installed it somewhere in your $PATH when you can call it just like that in the command line. Use type to find out where:

type rec
rec is /usr/local/bin/rec

Or maybe it's an alias, then it whould look like:

rec is aliased to `myscript --with --some --parameters blah'

You can then use type on myscript to find out where it lays.


How do I install indicator-weather in Ubuntu 14.10?

I was also a big fan of indicator-weather that I replaced by my-weather-indicator since no new versions are available as of 14.04.

my-weather-indicator is also a small indicator (as indicator-weather was):

You can install my-weather-indicator from the following ppa:

sudo add-apt-repository ppa:atareao/atareao
sudo apt-get update
sudo apt-get install my-weather-indicator python3-requests


How to make Eclipse installed via snap use a differerent configuration when started from global menu

There are many possible solutions but the my favorite/simplest one is to use Menulibre:

Copy /snap/eclipse/current/eclipse.ini to somewhere you can edit it. Let us say, copy it to /etc/eclipse.ini.

Edit the arguments you want to update[1] and save the file.

Open Menulibre[2]

Search for "Eclipse."

Click in the Eclipse icon.

In the "Command" input, add the --launcher.ini option after the binary path. In our example, we would replace
 /snap/bin/eclipse %U

with
 /snap/bin/eclipse  --launcher.ini /etc/eclipse.ini %U

Click in Menulibre's "Save" button. I have only tested it on Unity and MATE, though, not sure it is going to work with GNOME 3.

So far, it is working to me.

Notes
[1] I, for example, changed
    -Xms
    256m
    -Xmx
    1024m

to
    -Xms
    1024m
    -Xmx
    4096m

[2] You may have to install it. A way to do it is to use APT:
$ sudo apt-get install menulibre


External HDD not unmounted properly and now not working correctly

He likely had "Fast Start' enabled. Thus the drive is hibernated.

If you have a access to a Windows computer, start Windows twice with the drive plugged in, then eject it before turning off Windows.


Backup manager shows an error when I connect my external HDD

This is being tracked under Bug #617012. You may add your vote there to increase the relevancy for this bug to being fixed.


LUKS initramfs boot problem: "/dev/mapper/ubuntu-root does not exist." How can I fix it using a backup?

I FIXED IT!!
For the references of future generations, heres how:

The problem was that by plugging the a clone of the system I was running into it, I'd "confused" my system as to which drive to write to, and somehow nuked the Volume Group metadata for the original internal drive. Luckily, I still had the metadata from the clone I'd made.

This meant that I could plug in the working backup, unlock it, and use vgcfgbackup to make a copy of its metadata.

~$ sudo vgcfgbackup -f /tmp/trousers
  Volume group "ubuntu" successfully backed up.

This creates a text file with the metadata in /tmp called trousers (called it whatever you like, makes no difference)

Then, I dismounted and unplugged the functioning backup clone, and plugged in the borked internal drive. Unlocked it like I did the backup, then run:

 sudo vgcfgrestore -f /tmp/trousers ubuntu
  Restored volume group ubuntu

Upon doing this, the volume group suddenly sprang to life in disk utility, and the borked internal was unborked, mountable and readable again!

Critical bit here is that 'ubuntu' was the name of the original volume group. You can verify this by opening up the 'trousers' file in gedit and looking at the entry on the line below "creation_time".

Also worth noting that this only worked because the backup was an exact clone of the original internal, and hence the VG metatdata file had all the correct UUID's in place. I actually got an error message first time round because I'd originally manually changed one of the UUID's on the external drive.  I had to use pvdisplay on the original internal to find its UUID, and then manually edit the 'trousers' file to get it to work.

Anyway, hope that helps someone one day.


I can't update after failed installation of compiz-plugins-unsupported

please remove this repository because compiz you can found it in default repo so you don't wanna any third party repo

so use this command to remove this repo

sudo add-apt-repository -r ppa: compiz && sudo apt-get update

and to install compiz and all it's package you can do that by search on it and all results  appear to put it in installian command so write that

apt-cache search compiz

and all thing appear write in this command like

like this

sudo apt-get install compiz compiz-core compiz-dev compiz-dev compiz-fusion-plugins-main compiz-gnome compiz-plugins compiz-pluhins-* compizconfig-settings-manager -y

I'm sorry I have ubuntu 12.04 so I'm not sure if ubuntu 12.10 have same compiz's package but this is very best way to install compiz and you can use my command and see if it sucess or not


Will there be some kind of widgets for Unity ?

I do not think so, there will be more indicators afaik (such as indicator-weather) but I doubt there will be any widgets.  If you want widgets, give screenlets from the software center a try.  http://screenlets.org/index.php/Home

{edit}
you can actually run Plasma in unity -- see http://www.omgubuntu.co.uk/2011/05/how-to-run-kde-plasma-widgets-in-ubuntu-unity/


The F# license appears to be non-free as it only allows non-commercial use, so it wouldn't be legal to distribute this in a PPA. At best, there could be an fsharp-installer package created, which would automate those steps of downloading & installing it.


If i understood correctly, you want some delay time before restarting apache2.
If so, add this to crontab:

# On boot wait 20 seconds and restart apache2 service
@reboot sleep 20 && service apache2 restart


GUI does not start, xorg log shows errors

From what I understand this error shows that your Nvidia driver has a problem. Did you figure out that you have the driver or not ? You can check it by typing

sudo apt-get install nvidia-*

and see what results do you have. You can also reinstall xorg-xserver so it may solve but your problem.


Software Center lists no apps under the categories

Why you want gnome-software? You will be having snap store (ubuntu software).  If u are inclined to have gnome-software, try removing and purging whole data using command sudo apt-get remove --purge gnome-software then try installing again using sudo aptitude install gnome-software.  This should solve the problem.


Can't boot ISO to my laptop in UNetbootin (Xubuntu 12.04 & Ubuntu 12.04)

UNetbootin Is A little complex. Maybe UNetbootin Didnt Create A boot file or something. I Recommend You Simply Use The Ubuntu Startup Disk Creator if your Using A Usb.

If your Using A DVD/CD FOllow Here http://www.ubuntu.com/download/desktop/burn-a-dvd-on-ubuntu

If you Want To Use A USB Key Instead (Strongly Recommend it) Follow Here:http://www.ubuntu.com/download/desktop/create-a-usb-stick-on-ubuntu

Enjoy!


Why do I get this JRE JDK error message?

To make sure that Package 'icedtea-8-plugin' has an installation candidate, make sure that your Software & Updates app is set like shown below. The multiverse repository should be checkmarked. When you close the window, it'll ask you for permission to reload the software database... please go ahead and approve.

Then, in terminal, do the following to install the missing software:

note: the sudo apt-get update is redundant, but it's good to be sure it got done.

sudo apt-get update
sudo apt-get install icedtea-8-plugin


what is the correct way to alias a binary in /usr/local/bin?

Technically speaking, there is a way to "alias" default apps. What you are encountering with sudo apt-get install vim is Debian Alternatives System.

Basically , that system has list of default apps in /etc/alternatives/ folder, which are symlinks to whatever default app you have. Before installing vim you have vim.tiny, so vi gets symlinked to /etc/alternatives/vi , which then is symlinked to /usr/bin/vim.tiny. Once you get the actual vim, those symlinks all get updated to ultimately point to vim.

Of course there is manual way through sudo update-alternatives --config vi. And there of course is nothing stopping you from creating your own symlinks there. However for programs that aren't going to have many many different implementations, like screen for example, you could just leave them alone. Provided that /usr/bin is in your $PATH variable (which it should always be), you can just type in myappname and it will run.


Network icon disappears from panel 16.04

I had the same issue. I was able to resolve it by removing the state and restarting the network-manager.

sudo service network-manager stop

sudo rm /var/lib/NetworkManager/NetworkManager.state

sudo service network-manager start


Can someone help me with my ncmpcpp and mpd

You can try with my mpd.conf and see if it works for you (I also took the liberty to customize the directories for you, so that you don't have to change them!):

music_directory    "/home/nathan/Music"
playlist_directory "/home/nathan/.mpd/playlists"
db_file            "/home/nathan/.mpd/mpd.db"
log_file           "/home/nathan/.mpd/mpd.log"
pid_file           "/home/nathan/.mpd/mpd.pid"
state_file         "/home/nathan/.mpd/mpdstate"

audio_output {
      type  "pulse"
      name  "mpd pluse-audio-output"
 }

#audio_output {
#      type  "alsa"
#      name  "mpd alsamixer-output"
# }

audio_output {
    type                    "fifo"
    name                    "fifo_visualizer"
    path                    "/tmp/mpd.fifo"
    format                  "44100:16:2"
 }

If pulse doesn't work for you, you can always try alsa settings. Simply reverse/change # comments.
In ncmpcpp use either [8 and/or F8: Outputs], to activate/deactivate audio-output, by highlighting it, followed by pressing Enterkey!


I am testing all these SSD boost options,too. If u did a fresh install, trim is automatic activated.

Btw. For other performance boosts try noatime, zswap, zchache, data=writeback and other tweaks for fstab, but not in your swap partition.


What's the difference between lxde-core, lxde and lubuntu-desktop?

I was able to install LXDE in Ubuntu 20.04 with only a few apps.
sudo apt-get install lxde xorg lxdm --no-install-recommends

Make sure to choose lxdm as the default desktop manager so you'll get a minimal login prompt. Note that lock screen doesn't work with this. I recommend to use it with VNC.


How can I convert my output to .JSON and saves it as .json file

Is it your real task or a very simplified? If real, you can just rewrite this script with quotes and curly braces, it's not a lot of work. Mention the missed closing double quote in third code line.
#!/bin/bash
readarray -t array <<< "$(df -h)"

var=$(echo "${array[1]}"| grep -aob '%' | grep -oE '[0-9]+')

echo "${array[3]:$var-3:4}"

echo -e "({\"Manufacturer\":\""`cat /sys/class/dmi/id/chassis_vendor`"\","
echo -e "\"Product Name\":\""`cat /sys/class/dmi/id/product_name`"\","
echo -e "\"Version\":\""`cat /sys/class/dmi/id/bios_version`"\","
echo -e "\"Serial Number\":\""`cat /sys/class/dmi/id/product_serial`"\","
echo -e "\"PC Name\":\""`hostname`"\","
echo -e "\"Operating System\":\""`hostnamectl | grep "Operating System" | cut -d ' ' -f5-`"\","
echo -e "\"Architecture\":\""`arch`"\","
echo -e "\"Processor Name\":\""`awk -F':' '/^model name/ {print $2}' /proc/cpuinfo | uniq | sed -e 's/^[ \t]*//'`"\","
echo -e "\"Memory\":\"" `dmidecode -t 17 | grep "Size.*MB" | awk '{s+=$2} END {print s / 1024 "GB"}'`"\","
echo -e "\"HDD Model\":\""`cat /sys/block/sda/device/model`"\","
echo -e "\"System Main IP\":\""`hostname -I`"\"})"

To redirect this output you may use several approaches. First - you can just use redirection when calling the script like
script.sh > result.json.

Second (if you want to always use the same filename) - you can add the following line to the beginning of the script:
exec > filename.json

The third way is to surround your desired output with curly braces and redirect this part:
#!/bin/bash
readarray -t array <<< "$(df -h)"

var=$(echo "${array[1]}"| grep -aob '%' | grep -oE '[0-9]+')

echo "${array[3]:$var-3:4}"

{echo -e "({\"Manufacturer\":\""`cat /sys/class/dmi/id/chassis_vendor`"\","
echo -e "\"Product Name\":\""`cat /sys/class/dmi/id/product_name`"\","
echo -e "\"Version\":\""`cat /sys/class/dmi/id/bios_version`"\","
echo -e "\"Serial Number\":\""`cat /sys/class/dmi/id/product_serial`"\","
echo -e "\"PC Name\":\""`hostname`"\","
echo -e "\"Operating System\":\""`hostnamectl | grep "Operating System" | cut -d ' ' -f5-`"\","
echo -e "\"Architecture\":\""`arch`"\","
echo -e "\"Processor Name\":\""`awk -F':' '/^model name/ {print $2}' /proc/cpuinfo | uniq | sed -e 's/^[ \t]*//'`"\","
echo -e "\"Memory\":\"" `dmidecode -t 17 | grep "Size.*MB" | awk '{s+=$2} END {print s / 1024 "GB"}'`"\","
echo -e "\"HDD Model\":\""`cat /sys/block/sda/device/model`"\","
echo -e "\"System Main IP\":\""`hostname -I`"\"})"} > filename.json

The last way I'd like to propose is to modify output of your script after execution. The following command will do exactly what you need (but first line will be processed the same way and an empty string will be added to it, to avoid it you can try third method of output redirecting):
echo $(sed '$ s/,/)}/' <<< $(awk -F ":" 'BEGIN {OFS=""; print "({";}  { print "\"",$1,"\":\"",$2,"\",";} ' filename.json) | tr '\n' ' ') > filename.json

Awk here is used to add quotes to each field (-F flag means 'field separator'), OFS is set to empty string to avoid extra spaces. Then sed removes last comma (I know it's possible with awk too, but this approach looks much simpler, IMO). tr is used to replace all newline characters with spaces. Output is redirected to the same file. echo at the beginning adds newline to the end of output.


I really haven't tried this, but from reading several Ubuntu and Linux books, I can say:

You should be able to use a shared /home partition across Ubuntu distributions, providing that your login password is the same on both
installations.

Also, I would recommend that you move your home directory to its own partition, just in case you run out of space, or if you want to share it with another Linux distribution.

Also I would recommend using eCryptfs because, it guides you through the steps needed to create a private and secure encrypted directory.

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

sudo apt-get install ecryptfs-utils

Or you can download it Here.

For information and examples that might help you accomplish this, you can click Here for more details.  Hope this can help.


Turn off the "mic mute" button light on HP Elitebook 840

The solution is:

create a local .hwdb file with correct mapping in /etc/udev/hwdb.d/61-hp-mic-mute-hotkey.hwdb:

# see also: /lib/udev/hwdb.d/60-keyboard.hwdb
evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pn*EliteBook*:pvr*
KEYBOARD_KEY_81=f20                          # Fn+F8 on Elitebook, map to F20
# KEYBOARD_KEY_81=fn_esc                      # org entry

then generate a new /lib/udev/hwdb.bin file and reload it:

sudo udevadm -d hwdb --update; sudo udevadm -d control --reload; sudo udevadm trigger

Credit goes to the source here.


Ogg is technically a container format. It can include audio, video, and even text. Typically, it uses Vorbis audio and Theora video.

The current recommendation from the developer is to use the .ogv for video and .ogg for audio, but previously recommended .ogg for everything.

More at Wikipedia.

sox or ffmpeg can help you determine what the container contains.


You can also use, Simplenote or even Google Keep through Google Chrome.

Hope I've helped.

PS: There's also a new app around named Turtl, and is pretty good too.


Creating a folder based on a portion of a file name

Something like this should do:

for file in ./*_???ILN*; do
    dir=${file%ILN*}
    dir=${dir##*_}
    mkdir -p "./$dir" &&
    mv -iv "$file" "./$dir"
done

See FAQ 100 for more on string manipulations in bash.


The precise question you are asking is a little unclear to me, but I think what you are trying to do is very much possible. It sounds like you want to connect over the Internet, not just your local network. You'll want to first try getting it up and running locally, then work on connecting from outside. At a very high level, here are the basic steps:

First, install and configure an SSH
server
on any destination device.

To find out the private IP and connect over your local network,
easiest would probably be to run ifconfig or ip a from the destination
device. Alternatively, you might look at the leases on your router,
or maybe even use a network scanner (such as
Fing on an Android
device).

At this point you're already able to connect from one device to another via SSH on your local network. If you're going to be doing this regularly and/or want to connect
from outside, you'll want to configure a static IP or DHCP
reservation either on the destination server
itself,
or on your router. It's generally easier to do this from the router in my opinion, but every router is different.

To connect from outside, at minimum you will need to set up port
forwarding on your router. Before doing this, make sure you have a very strong password on any account with SSH access (For more in security, see step 6.)

Now your ready to connect from an external network. You can simply
look up your public IP from a device
at home and if port forwarding is configured correctly, that should
work--until your IP changes. To reliably find your public IP while
remote, you'll probably want to have a public DNS name.
No-IP is a free and easy solution for this.
Once you have that set up, you could simply SSH to
"AnotherChemist.hopto.org" or whatever you manage to reserve.

The last point I will make is that if you do want to connect
remotely, you need to consider security.
Here is a
good list of relevant tips. If at all possible, you really want to
disable remote password logins and allow certificate-based logins
only. At the very least, make sure you have a very strong password
and put fail2ban in place. Do this before you enable port
forwarding for any significant amount of time. Especially if you
are on the default SSH port of 23, hackers around the world will
literally start trying to brute force your password within a matter
of minutes!


Add before filter section in /etc/ufw/before.rules(top of file):

*nat
:PREROUTING ACCEPT [0:0]
-A PREROUTING -p tcp --dport 1724 -j REDIRECT --to-port 1723
COMMIT

These rules will then need to be reloaded; simply disabling and re-enabling ufw or running ufw reload is not sufficient. The simplest solution is to reboot, otherwise you can use one of the workarounds mentioned in Launchpad bug #881137.


The solution is to convert all .png files in cd /usr/share/mplayer/skins/default to png24.

You can use imagemagick:

for FILE in *.png ; do sudo convert $FILE -define png:format=png24 $FILE ; done


Thunderbird Exchange and Gmail Calendar Merge

there are a number of addons on thunderbird which sycs google tasks, calendar and google contacts without breaking a sweat.the addons are 1. provider for googe calendar 2. google task sync 3. zindus . all three are two way sync addons.


It turns out the issue was an incompatibility between my specific USB flash drive and the BIOS of my ThinkPad.  I was able to boot from identical Ubuntu installations on other USB flash drives; however, my laptop refused to recognize my drive in the boot menu (the "ubuntu" item in the boot menu turned out to be some kind of phantom and disappeared after a BIOS reset).  Just in case anyone ever tries to do something similar, at this time the Lenovo ThinkPad T520 BIOS doesn't recognize the SanDisk Extreme USB 3.0 flash drive for booting purposes; the drive works fine once the computer has booted into Windows.  It is possible that this problem extended to other models in the ThinkPad line, see here.  Hope this helps!


trying to write bash script that sends email with output from two variables ubuntu 18.04

You need to use Bash command substitution in the same manner as you have done earlier in the script.

Change:

-m "$SSH_USERS \n lsof -u "$SSH_USER""

to

-m "$SSH_USERS \n $(lsof -u "$SSH_USER")"

This will actually run the lsof command that you're looking for.

It's also worth noting that double quotes do not nest, they act like a toggle, som in the original version, you quote "$SSH_USERS \n lsof -u " while $SSH_USER is unquoted, then the "" at the end doesn't do anything.


launch firefox full screen on boot - Ubuntu 16.04

I recommend using an add-on like Auto FullScreen for Firefox.


MS Teams locked onto an old organisation

On Ubuntu 18.04:
sudo apt purge teams
rm -rf ~/.config/Microsoft/Microsoft\ Teams/
rm -rf ~/.config/Microsoft\ Teams\ -\ Preview/
sudo apt install teams


Wget: download files to specific directory

use -P option.

wget -P /home/user/directory_you_want http:url_you_are_downloading_from

See more at : Stackoverflow page


Why am I not able to shutdown, log-off and restart after an upgrade to Ubuntu 13.10?

Had the same problem and found out that even "shutdown" command from terminal didn't help much either.

I am using also Cairo dock and found out that if I try to restart or shutdown from Cairo, it does.

Silly may seems but for me worked.


How can I run Ubuntu reliably on an AMD APU (such as Raven Ridge, Picasso and Renoir chips)?

Summary

No, it is not possible to be confident that Ubuntu will run on AMD APUs. Some users have stable systems, but others are not able to get Ubuntu to boot to a graphical desktop at all, while many have frequent unexplained crashes. This situation seems unlikely to change in the near future.

Scope and Definitions

An APU is an Accelerated Processing Unit, AMD's term for a chip that combines both a CPU and an integrated GPU in a single package.

This answer concerns the following APUs, which all use Vega graphics:

Raven Ridge: AMD's 2018 line of APUs, including chips named Athlon 2x0GE or 3000G and Ryzen 2x00G, 2x00GE, 2x00H or 2x00U.
Picasso: AMD's 2019 line of APUs, including chips named Athlon 300GE or 300U, and Ryzen 3x00G, 3x00GE, 3x50H or 3x00U.
Renoir: AMD's 2020 line of APUs, initially including chips named Ryzen 4x00H or 4x00U.

Raven Ridge Stability

In August 2019, Michael Larabel of Phoronix reported that using Linux with Raven Ridge chips "at times yielded an experience like Russian roulette". He did not have a stable Ubuntu 19.04 system on the 2200G and 2400G at that time, 18 months after launch, though he reported that the situation was much improved.

Larabel later noticed that users of Linux kernels 5.2 and 5.3 (in Ubuntu 19.10) had an issue where AMD APUs would frequently trigger reboots.

In November 2019, Larabel reported that Linux 5.4 would include further stability fixes for Raven Ridge. This kernel version will be included in Ubuntu 20.04.

Raven Ridge Workarounds

If using kernel version 5.3, provided in  Ubuntu 19.10, it may be possible to avoid reboots by using the AMDGPU kernel setting amdgpu.noretry=0 (Larabel).

Picasso Stability

In August 2019, Michael Larabel of Phoronix reported that the 3400G was stable on Ubuntu 19.04 with Linux kernel 5.3. This kernel version is also used in Ubuntu 18.04.4.

In September 2019, Mike W said in an Askubuntu question that he was unable to boot to a graphical desktop using Manjaro 18.1.0 (which uses the 4.19 LTS kernel).

In April 2020, Rodney in Vancouver answered this question by stating that the 3200G was stable on Ubuntu 18.04.

Other issues

Larabel reported in January 2020 that Raven Ridge chips sometimes added clicking noises to their audio output, but AMD had patched this for a future kernel update (probably in Ubuntu 20.10).

(This answer is still incomplete and being edited)


Won't automatically reconnect wifi on startup (18.10)

Edited the connection in Network Manager to disable the automatic connection.  Applied.  Went back and turned it back on.  Applied.  Also, (and I'm pretty sure this was the culprit) there was a value in place for the MAC address field.  Removed it, then Applied the settings.  Checked the profile in system-connections, and the MAC field was blank there, too.  Rebooted, and the wifi popped right up.

I think what happened was that it was trying to look for the specific MAC each time it booted up, but the MAC address kept changing, and the new MAC didn't match any of the old profiles so it decided it needed a new profile.  By removing the MAC, it was left to auto-configure, turning the existing profile into a one-size-fits-all.


Go to Menu > Preferences > Default App... > Autostart
and add the command you need.


After pressing F6, manually edit the command line that appears to add acpi=off (or whatever boot options are necessary for other people) before AND after the -- delimiter


Accessing Windows 7 QEMU/KVM Virtual Machine on portable via spice from another machine

You should be able to connect with any of the spice clients (there are several to choose from).

spicec -h <host_ip_address> -p <port_number> -w <password>

The port numbers start with 5900 with the first guest, then 5901, etc.

If you can not connect, please be sure you have not firewalled the server or client and update your question with what client you are using.


Mozilla firefox redirecting websites to greefl

Many malwares can fake being a useful addon like flashplugin and what not. Here is such a report https://support.mozilla.org/en-US/questions/953200. Even removing them won't remove the changes in settings.

I recommend resetting Firefox instead. To do so, follow these steps

Click the icon that looks like three stacked lines at the top right of the browser window.
Click on the question-mark icon at the bottom of the drop-down menu.
Click on 'Troubleshooting information' in the slide-out menu.
Click the 'Refresh Firefox' button at the top right of the new Web page.


From the comments...

In the guest OS settings, by setting CPU=4 you've committed all of the CPU resources in your computer to the guest VM. Host operation will slow to a crawl. Generally speaking, you shouldn't commit more than half of the number of physical CPUs to a guest VM.

In the guest OS System settings, set the memory to 2048 and the CPU's = 2.


Unable to resize ext4 file system in Ubuntu 18.04

Download ubuntu image here.
Burn on USB (Windows/Ubuntu).
Boot from USB.
Open a terminal:

Execute as root

swapoff -a

To make the changes permanent edit /etc/fstab and comment out the swap entry.

sudo nano /etc/fstab

Reboot.


Enabling remote access to ArangoDB web interface

After installation ArangoDB only listens to localhost, which is set by default.
To expose the service to another network, you have to adjust the ArangoDB configuration.

Edit the configuration. Default location /etc/arangodb3/arangod.conf (Ubuntu)

#endpoint = tcp://127.0.0.1:8529     // comment out that line
endpoint = tcp://192.168.123.4:8529  // add your servers IP address

Or expose it to all networks (if wanted):

endpoint = tcp://0.0.0.0:8529  // listen to all networks

Then perform a restart of the ArangoDB service:

sudo systemctl restart arangodb3


It is telling you that in source file /home/alex/Downloads/Examples/Example1/writeSolutions.h, it is trying to #include <hdf5.h>, but cannot find the file. By using apt-cache search hdf5, I found (among others) the following packages:

libhdf5-10 - Hierarchical Data Format 5 (HDF5) - runtime files - serial version
libhdf5-10-dbg - Hierarchical Data Format 5 (HDF5) - Debug package
libhdf5-cpp-11 - Hierarchical Data Format 5 (HDF5) - C++ libraries
libhdf5-cpp-11-dbg - Hierarchical Data Format 5 (HDF5) - C++ Debug package
libhdf5-dev - Hierarchical Data Format 5 (HDF5) - development files - serial version
libhdf5-doc - Hierarchical Data Format 5 (HDF5) - Documentation
libhdf5-serial-dev - transitional dummy package
libhe5-hdfeos-dev - Development files for the HDF-EOS5 library
libhe5-hdfeos0 - Earth Observation System extensions to HDF5
libpbihdf - tools for handling PacBio hdf5 files
libpbihdf-dev - tools for handling PacBio hdf5 files (development files)
libhdf5-7 - Hierarchical Data Format 5 (HDF5) - runtime files - serial version

You need to install the libhdf5-dev package to get hdf5.h.

By searching on packages.ubuntu.com I found these packages for you:

You have searched for files named hdf5.h in suite xenial, all sections, and all architectures. Found 6 results.
File    Packages
/usr/include/flann/io/hdf5.h    libflann-dev
/usr/include/hdf5/mpich/hdf5.h  libhdf5-mpich-dev
/usr/include/hdf5/openmpi/hdf5.h    libhdf5-openmpi-dev
/usr/include/hdf5/serial/hdf5.h     libhdf5-dev
/usr/include/opencv2/flann/hdf5.h   libopencv-flann-dev
/usr/include/shark/Data/HDF5.h  libshark-dev


copy n number of files from one folder to another folder

You could do something like

k=1; find source/ -type f | while read file; do
     [[ k++ -le 20 ]] && cp "$file" target/
done

That will find all files in the current directory and copy the first 20 it finds to target/. The trick is the $k variable which is initialized to 1. Then, the [[ k++ -le 20 ]] && cp means "If $k plus one is less than or equal to 20, run the cp command".

The above will break if your file names contain spaces or newlines or other strangeness. If that can be an issue, use this safer version instead:

k=1; find source/ -type f -print0 |
    while IFS= read -d '' -r file; do
        [[ k++ -le 20 ]] && cp "$file" target/
    done

If you don't need to descend into subdirectories, just do

k=1; for file in *; do [[ k++ -le 20 ]] && cp "$file" target/ ; done

Finally, to calculate n on the fly, you can do (note that this will also count subdirectories)

files=( * ); ## save all files in the current directory in an array
n=$(echo "${#files[@]} / 3 " | bc) ## get the value of n/3
for file in "${files[@]:1:$n}"; do cp "$file" bar/; done

The solution above should work with arbitrary file names, even those including newlines.


How do I correctly install r8169 Network driver?

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

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

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

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


Help with Grub (Stopped working after windows 10 update)

The WIn10 Creators update deletes linux partitions.

Sectors 764,002,303 -  968,802,303 are unallocated. this is probably your linux partition.

Testdisk can be use to recover it. In most cases just recovery of the partition is enough to allow boot.
However, if you have attempted other boot repairs, those repairs may need to be reversed.


What is the "cursor" device provided by Wacom tablets?

According to this page, the cursor device is a "mouse-like device compatible with some tablets". It's not clear to me why this is referred to as "mouse-like" rather than simply a "mouse", but it appears that my model is compatible with one of Wacom's mice.

I don't own one of these mice, so I can't test this hypothesis, but I'll make this the provisional answer until someone can confim it.


How to share file with User with just read privileges

That depends on A's group and B's group. If they are in the same, you need to check group permission (middle of the permission line) are enabling reading :

-rw-r--r--

Here, user can read and write, group can only read, and other can only read.

If A and B are not in the same group, then B have the other permissions, and you need to set those to read.

Reminder: to change a file permission, open a terminal (Ctrl+Alt+T) and type

chmod g+r myFile

g means group, but it can be u for user or o for other.
rmeans read, and it could be replace by wfor write or x to execute.


Wine and Font Awesome have conflicting fonts

For anyone who stumbles to this page, I did find a solution.

Open ~/.config/i3/config and include FontAwesome on your font line.

For example, change:

  font pango:monospace 20

To:

    font pango:monospace, FontAwesome 20

This line is used for overriding the system default settings for fonts. In the case above, i3 will check monospace for the proper glyph first, then FontAwesome. If it's not found, the system default settings are used.

Hope this helps!


I am not able to find other people on my local network when playing Counter Strike 1.6

try this command :

sudo iptables -R INPUT 5 -p udp -m udp --sport 26900:27030 --dport 1025:65355 -j ACCEPT

also you can read  :
https://www.linode.com/docs/game-servers/launch-a-counter-strike-global-offensive-server-on-ubuntu-14-04


Kubuntu one SSD of mdadm and Nvidia drivers fail to load at same time

I did the above and there were no big surprises.  The only thing is that since the drive was already in removed status, it couldn't be manually failed or removed.  It would seem that manually failing a drive is just for testing drives that are synced.

My graphics resolution (and 2nd screen) went back to normal so I wonder if that is a feature to alert people that they need to do something.  Were it not for that, I would have droned on with a bad drive.


Try Booting into recovery mode or booting from a older kernel by holding down shift going to  Advanced Options for Ubuntu and then you can choose to enter recovery mode or boot a from an older kernel.


Try this:

Quit skype
Move away the ~/.Skype folder
Start skype without the previous history.

That worked for me, at least first. However, the problem with the disappeared Recent chats came back, so I had to redo the above...

It seems like a bug in the new skype client.


Can I get transmission to quit instead of minimize?

Transmission:

Disable the checkbox beside Show Transmission icon in the notification area. You would find this option under Edit Menu → Preferences → Desktop Tab.


Send media play/pause shortcuts to music player rather than video player

I found an answer myself!

Go to Settings -> Keyboard -> Shortcuts, and create a new Custom Shortcut. Give it an appropriate name, and for the command put:

dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause

Assign it to an appropriate key, and now that key will only send to Spotify.

For Next and Previous the commands are, respectively:

dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next

dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous


No permission to suspend/hibernate after upgrading to 12.10

Here's a workaround. First you'll need to create a script that is on your PATH. I'd recommend putting something like this in your ~/.bashrc file if you don't have it already:

PATH=/home/<username>/bin:$PATH

Then create a script /home/<username>/bin/pm-suspend which contains:

#!/bin/sh
sudo pm-suspend

Finally edit the sudoers file to not ask for a password for the pm-suspend command:

sudo visudo

Add the following line as the last rule in the file:

<username> ALL=NOPASSWD:/usr/sbin/pm-suspend

If you now launch a new terminal window/tab you should now be able to run pm-suspend without sudo and suspend from your desktop. It's a bit or a bodge but seems to work for now.


Run the command sudo cp /etc/default/grub /etc/default/grub.backup
Run the command gksudo gedit /etc/default/grub
Make sure you do not see noacpi (set it to acpi or delete it, depending on where it is), pci=noacpi (set it to pci=acpi), or acpi=off (set it to acpi=on)
Reboot and see if it helps.

Basically, you set Ubuntu to use acpi to control the hardware, which generally fixes overheating. If your computer does not boot, revert /etc/default/grub to /etc/default/grub.backup.


Battle.net Launcher Crashes, typical fix not working. World of Warcraft once run in 64-bit, now saying memory can't be "read"

SOLVED.

I checked Additional Drivers, and it turned out that the Graphics Driver was the issue. Opened terminal and ran:

sudo apt-get install nvidia-331

AND IT BE WORKIN.


Connect to internet by wire and run

sudo apt-get install dkms
wget https://launchpad.net/~hanipouspilot/+archive/ubuntu/rtlwifi/+files/rtlwifi-new-dkms_0.5_all.deb
wget https://launchpad.net/~hanipouspilot/+archive/ubuntu/rtlwifi/+files/linux-firmware_1.144%2Bar3012_all.deb
sudo dpkg -i rtlwifi-new-dkms_0.5_all.deb
sudo dpkg -i linux-firmware*.deb

and reboot.


Is there a way to add the status bar to Files (Nautilus) on Ubuntu 14.04

I had the same problem when upgrading to Ubuntu 14.04 recently - and I wanted to see the free space on the partition.
So after searching a while, I decided to code my own plugin that does just that, because I couldn't find anything that does that out of the box.

If it helps anyone, here is the link:

https://github.com/climaxx/Nautilus-Status-Bar-Replacement

It displays the free GB amount in a text bar below the address bar.

For files I use Alt + Enter to see the file size and I am used to that.


Is there any way to create or simulate a frugal installation of Ubuntu/Lubuntu on a usb flash drive?

I found this thread

There is a guide of how to do exactly what I ask but it's quite old and valid for 14.10 version. So i have to try it.

And here i found how to decrease swapping and how to make files stay in the RAM cache longer, which both help.


How do I run lintian from pbuilder-dist?

Lintian can be run inside cowbuilder or pbuilder using hooks.
Several examples are available in /usr/share/doc/pbuilder/examples/

Just copy the hook you want to a directory:

mkdir ~/pbuilderhooks
cp /usr/share/doc/pbuilder/examples/B90lintian $HOME/pbuilderhooks

Then tell pbuilder to use the hooks in that directory:

echo "HOOKDIR=$HOME/pbuilderhooks/" >> ~/.pbuilderrc

And/or:

echo "HOOKDIR=$HOME/pbuilderhooks/" | sudo tee -a /etc/pbuilderrc

The first  is required if you intend to run cowbuilder-dist or pbuilder-dist without sudo; the latter if you intend to run sudo cowbuilder or sudo pbuilder.  Use tee -a to avoid overwriting the original /etc/pbuilderrc file.


The Ubuntu "Sound" configuration panel in the system settings (click the top right corner, then click the spanner and screwdriver icon, then select "Sound") can leave a bit to be desired in how much information and control you can get.

For full control of the various audio capabilities of your system, I recommend to search and installed from the Ubuntu Software Center the "Pulse Audio Volume Control".

After you install and run it, you can go to the "Output Devices" tab and see all your audio devices and what port is enabled.

For example - on my laptop, I can see the "Built-in Audio Analog Stereo" as the first device, and the "Port" menu shows which output ports are available. As you can see in the screenshot below, I can use either "Speakers", or "Headphones", though the latter are unplugged:

When plugging headphones into the headphones port, the port should automatically change to specify "Headphones (plugged in)" :

At any point you can control individually the volume for your speaker, or headphone.

That being said, the fact that the headphones are detected and select in the "Port" menu doesn't mean applications will necessarily will play to them - if you have more than one devices (as can be seen in my configuration).

First, it is suggested that you click the blue button on the right side of your output device where the headphones are plugged, to set this device as the default output for new applications - on my setup you can see that the last device is actually chosen as the default output (it is my dock).

After which you can see which applications are running and what output device they are using, using the "Playback" tab:

You can see that I have "mpv" playing to the "Built-in Audio Analog Stereo" - which is the device where the headphones are plugged into. If this is not the correct device, you can click the button showing the device name, and choose the correct device.


Unreadable font when using particular apps

The font that you see on a website or an application is specific to it (unless, there's an override setting) and, usually, is not controlled by your browser or system font settings.
Please check the settings menu for an option to change the font. I guess, it's under <Application_Menu> → Settings, like Steam → Settings, for example.
If the font setting option menu is not present, you have to change them under the config files from the terminal. Since you haven't mentioned your OS type, I have to assume that it's Ubuntu, as you've placed this question in askubuntu.com.
Usually, the style configuration files will be under a folder named resources or configuration that is present inside the software installation path.
For example, /opt/steam/resources/style or /usr/share/steam/resources/style or /opt/steam/config.
The sub-folder name could be style or skins - depending on the browser/application.
Now, check for a file that has the font (or, skin) configuration in it and change the font-type in it, according to your taste (you need to have font-family name ready, which you can get from your installed fonts in the system).
Be careful not to change any other setting under the config folders - unless you are sure of the impact. Also, it's always wise to make a backup of the file that you're editing before making the changes.
Note: The folder names given above are just a guideline of the pattern to look for & not the exact folders, themselves.


how to open a file type pkz in ubuntu with a packet tracer version 6.0.3

That file is likely to be the Windows version for packet tracer so it might not be compatible.

  anyone know how to open this type of file in ubuntu with this version of packet tracer?

Install Virtualbox, Windows in it, Packet tracer in it. And then open the file in there.


Unable to install Skype ("Unmet dependencies" error)

Your dependencies are broken even though skype is installed.
run this command:

sudo apt-get install -f

This should help to fix the broken dependancies


How can I get flash working on Kubuntu 11.04 64bit?

Updated December 29, 2011

It is no longer necessary to manually install flash.  The package adobe-flashplugin will install the latest version of flash (currently 11).  The original script is kept below for historical purposes.

If you used the original script to manually install flash, you'll need to do a bit of cleanup before things will work right. I've provided an additional script immediately below which will both perform the clean up and install flash.

# Clean Up #
sudo killall -9 firefox
sudo kiallall -9 chrome
# Note that it might be desirable to remove nspluginwrapper, but I have not included
# it because acroread requires it.
sudo apt-get remove -y --purge gnash gnash-common mozilla-plugin-gnash swfdec-mozilla libflashsupport adobe-flashplugin flashplugin-installer flashplugin-nonfree
sudo rm -f /usr/lib/mozilla/plugins/*flash*
sudo rm -f ~/.mozilla/plugins/*flash*
sudo rm -f /usr/lib/firefox/plugins/*flash*
sudo rm -f /usr/lib/firefox-addons/plugins/*flash*
sudo rm -rfd /usr/lib/nspluginwrapper
sudo rm -rf /usr/lib/flashplugin-manual
sudo rm -f /opt/google/chrome/plugins/libflashplayer.so
# Install #
sudo apt-get update
sudo apt-get install -y adobe-flashplugin

Note that I still had to purge chrome (sudo apt-get remove -y --purge google-chrome-stable) and redownload and install to get flash working properly in chrome.  Firefox worked no problem.

Original

Adapting the script given by @anne and combining it with these instructions, I have the set of steps I followed below.

# Preparation #
sudo killall -9 firefox
sudo apt-get remove -y --purge flashplugin-nonfree gnash gnash-common mozilla-plugin-gnash swfdec-mozilla libflashsupport nspluginwrapper
sudo rm -f /usr/lib/mozilla/plugins/*flash*
sudo rm -f ~/.mozilla/plugins/*flash*
sudo rm -f /usr/lib/firefox/plugins/*flash*
sudo rm -f /usr/lib/firefox-addons/plugins/*flash*
sudo rm -rfd /usr/lib/nspluginwrapper

# Download and Extract Flash #
cd ~
wget http://download.macromedia.com/pub/labs/flashplayer10/flashplayer10_2_p3_64bit_linux_111710.tar.gz
tar xzvf flashplayer10_2_p3_64bit_linux_111710.tar.gz

# Install #
sudo mkdir /usr/lib/flashplugin-manual
sudo mv libflashplayer.so /usr/lib/flashplugin-manual/
# Firefox
sudo ln -sf /usr/lib/flashplugin-manual/libflashplayer.so /usr/lib/mozilla/plugins/
# Note that I didn't need to do the next two commands, but I left them in anyway.
# Firefox is not my main browser, so I'm not sure what the purpose of those two commands are
sudo ln -sf /usr/lib/flashplugin-manual/libflashplayer.so /usr/lib/firefox-addons/plugins/
sudo ln -sf /usr/lib/flashplugin-manual/libflashplayer.so  /usr/lib/xulrunner-addons/plugins/
# Chrome
sudo mkdir -p /opt/google/chrome/plugins
sudo ln -sf /usr/lib/flashplugin-manual/libflashplayer.so /opt/google/chrome/plugins/libflashplayer.so

# Cleanup #
rm flashplayer10_2_p3_64bit_linux_111710.tar.gz


Unable to detect/boot Windows 10 after converting Ubuntu from MBR+BIOS to GPT+EFI

Short answer, you can't boot a legacy Windows from UEFI grub. Once grub boots, the boot mode has been set to UEFI, and your Windows is in legacy mode, so cannot boot.  You can select the device Windows is on (presumably with its own boot loaders), and boot that from the EFI boot menu (some function key at power-up to allow you to select boot device/OS).  You could have either another grub installation or Windows boot successfully off that second disk, which would be in legacy mode.  Try just booting the second disk, Windows may come up.


How install Windows XP , withou CD and any kind , exep a USB

Not sure which direction you are trying to achieve, but there are a couple things to consider.

if you are installing WinXp inside VirtualBox or VMWare Player for ubuntu, it is really no brainer.. just pop in the ISO image, and VMWare should take care of installation for you.
if you are doing dual booting, you need to determine if your BIOS can boot USB. If so, I would go ahead and build a Windows PE or Bart's Boot disk. Once you boot into the PE environment, you can use diskpart to format the partition (i.e. in NTFS, not FAT32). After that you browse to the WinXp installation folder and kick off the installation with command like "Winnt32.exe /syspart:d: /tempdrive:d /makelocalsource"   Once installation done, you then need to fix the MBR, so that GRUB can co-exist with Windows. Takes about one afternoon to get both Windows & ubuntu to play nice together.


Strange IP address connection from my computer

It's your browser (chrome) connecting to the IP 138.128.180.106, which is owned by a company called HostDime.

Probably a website you visit is hosted by this company.

As the port is also 443, it is probably using HTTPS to access the website.


What do the '?', '.' and '+' symbols mean when I run 'who -aH'?

From info who:

  After each login name print a character indicating the user's
  message status:

`+' allowing `write' messages
 `-' disallowing `write' messages
 `?' cannot find terminal device

Extending the same info to IDLE, it seems ? indicates it cannot determine who much the time the user has been idle, and a . indicates the user (terminal) is currently active.


maybe this issue https://bugs.launchpad.net/ubuntu/+source/linux/+bug/591532 can be related with your problem, I was having a issue with kernel 2.35.14 it seemed like my hd had stoped to work but the problem was the kernel bug that I solved by upgrading it.


On Ubuntu Server 18.04, can't get my domain to resolve unless www is used

Problem is with DNS resolution.

dig pangeawerks.com

; <<>> DiG 9.11.3-RedHat-9.11.3-12.fc28 <<>> pangeawerks.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 39391
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;pangeawerks.com.       IN  A

;; Query time: 462 msec
;; SERVER: 192.168.0.1#53(192.168.0.1)
;; WHEN: Wed Jul 18 21:02:31 CEST 2018
;; MSG SIZE  rcvd: 44

and

dig www.pangeawerks.com

; <<>> DiG 9.11.3-RedHat-9.11.3-12.fc28 <<>> www.pangeawerks.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 36304
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;www.pangeawerks.com.       IN  A

;; ANSWER SECTION:
www.pangeawerks.com.    604424  IN  A   72.31.51.26

;; Query time: 7 msec
;; SERVER: 192.168.0.1#53(192.168.0.1)
;; WHEN: Wed Jul 18 21:02:49 CEST 2018
;; MSG SIZE  rcvd: 53

Create fallowing records. First A record to point to you ip

pangeawerks.com     A     72.31.51.26

After that make CNAME record to connect www with hostname

www.pangeawerks.com   CNAME    pangeawerks.com

This records must be make on Authority DNS server.

Here are the current results of dig pangeawerks.com:

; <<>> DiG 9.11.3-1ubuntu1.1-Ubuntu <<>> pangeawerks.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 57836
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
; COOKIE: 79cc3057e00d2854be8b8e965b4f92ce402e52c17af6f46e (good)
;; QUESTION SECTION:
;pangeawerks.com.               IN      A

;; Query time: 405 msec
;; SERVER: 72.31.51.26#53(72.31.51.26)
;; WHEN: Wed Jul 18 15:19:42 EDT 2018
;; MSG SIZE  rcvd: 72

Here is the contents of my zone file for pangeawerks.com.db:

; BIND data file for local loopback interface
;
$TTL    604800
@       IN      SOA     pangeawerks.com. PANGEAVERSE.pangeawerks.com. (
                         33         ; Serial
                     604800         ; Refresh
                      86400         ; Retry
                    2419200         ; Expire
                     604800 )       ; Negative Cache TTL
;
@       IN      NS      localhost.
@       IN      A       72.31.51.26
@       IN      AAAA    ::1

;Name Server Information
@       IN      NS      PANGEAVERSE.pangeawerks.com.

;IP address of Your Domain Name Server(DNS)
pangeawerks.com  A      73.31.51.26

;Mail Server MX (Mail exchanger) Record
pangeawerks.com. IN  MX  10  mail.pangeawerks.com.

;A Record for Host names
www     IN       A       72.31.51.26
mail    IN       A       72.31.51.30

;CNAME Record
ftp     IN      CNAME    www.pangeawerks.com.
www.pangeawerks.com     CNAME   pangeawerks.com.

And here is the reverse lookup file db.72:

;
; BIND reverse data file for local loopback interface
;
$TTL    604800
@       IN      SOA     pangeawerks.com. PANGEAVERSE.pangeawerks.com. (
                          6         ; Serial
                     604800         ; Refresh
                      86400         ; Retry
                    2419200         ; Expire
                     604800 )       ; Negative Cache TTL
;
@          IN      NS      pangeawerks.com.
26.51.31   IN      PTR     pangeawerks.com.

;Your Name Server Info
@               IN      NS      PANGEAVERSE.pangeawerks.com.
PANGEAVERSE     IN      A       72.31.51.26

;Reverse Lookup for your DNS Server
26              IN      PTR     PANGEAVERSE.pangeawerks.com.

;PTR Record IP address to HostName
26              IN      PTR     www.pangeawerks.com.
30              IN      PTR     mail.pangeawerks.com.

PANGEAVERSE is the hostname of the server - the FQDN is PANGEAVERSE.pangeawerks.com

Here is the contents of the /etc/hosts file (lots of commenting out of wrong stuff - did not want to get rid of them in case I needed them again or did something wrong):

#127.0.0.1 localhost localhost.pangeawerks.com PANGEAVERSE
#127.0.0.1      localhost PANGEAVERSE
72.31.51.26     PANGEAVERSE.pangeawerks.com     PANGEAVERSE

# The following lines are desirable for IPv6 capable hosts
#::1     localhost ip6-localhost ip6-loopback
#ff02::1 ip6-allnodes
#ff02::2 ip6-allrouters
#72.31.51.26  pangeawerks.com
#72.31.51.26  www.pangeawerks.com

Please suggest proper formatting of any of these files, as it's a bit of a hodge podge of other templates.  I am SURE I did something wrong.

Thanks.


How to add Main Menu and other widgets to gnome-do

For the menu try Cardapio.

sudo add-apt-repository ppa:tvst-hotmail/cardapio
sudo apt-get update && sudo apt-get install python-keybinder cardapio

This article at OMG!Ubuntu explains how to hook it up to the anchor icon.Or you could try GnoMenu a try, see This article.


If you can boot the live session successfully you can always run the installer from within it. The installer application name is Ubiquity and the executable name is ubiquity.

As for the kernel boot parameters (e. g. nolapic), you can always edit those after the installation even if the boot entry in question is currently unbootable if you can boot a different Ubuntu installation or Live system.


Why can't I resize a dynamic VDI with modifyhd command?

To use VBoxManage modifyhd we have the following caveats:

Drives need to be in .VDI or .VHD format.
Drives must be in dynamic format, not fixed (a fixed disk can be converted to dynamic by creating a clone).
Drive size will only affect the logical size, not the physical size.
Shrinking a drive to equal or below its physical size is not possible.
For shrinking the physical size we have to fill unused drive space with 0.
A Windows VDI may have to be defragmented before shrinking its physical size.

In the example above it was tried to resize a dynamic disk with a physical size of 4693 MB to 2000 MB, which is not possible. Hence the error.


Can't update or install apps on Ubuntu Touch

To solve this problem in my case:

I rebooted and left the phone off overnight.

I also had to add my Ubuntu One account again in Settings, then in  Accounts.


Cannot expand Ubuntu partition even though I have 22 GB of extra unallocated space

You have to expand the /dev/sda3 partition (to the left) to make it contain the unallocated space. Then you can expand the Ubuntu partition :)


I've never used PlayOnLinux before, but I've used an xbox 360 controller as a mouse using xboxdrv.  I'm guessing this will make it work but you might have to mess around with some settings on PlayOnLinux first, but this will definitely make the controller work with ubuntu.

To install xboxdrv, I used these commands in terminal:

sudo apt-get install --install-recommends jstest* joystick xboxdrv
sudo rmmod xpad
sudo apt-get update
sudo apt-get install xboxdrv

then to run just type (when I first started using this I had to use "sudo rmmod xpad" before it would work each time):

xboxdrv --silent

To calibrate and configure the controller, run:

jstest-gtk

clicking on properties with the device selected will enable you to calibrate it.

Finally I'll leave you with a link to all the various things you can do with xboxdrv and how to do them.  There's loads of stuff here to read through, but you can do some pretty cool stuff with it if you've got time to figure it all out!

This is what worked for me.  Here's where I got most of my information.  If anything doesn't work I'd refer to that page and see if any of the solutions there help.

I hope my ramblings have been useful in some way! :D


How to compare and replace the value at particular location with awk


ATI Radeon HD with Catalyst driver stuck mirroring screens

I've finally gotten it to work, and it took more than simply reinstalling Ubuntu, which is why I'm answering my own question. I took the directions from http://wiki.cchtml.com/index.php/Ubuntu_Oneiric_Installation_Guide#Installing_Catalyst_Manually_.28from_AMD.2FATI.27s_site.29

These are my steps, which were important since it turns out that 64-bit breaks down in the latest 11-9 default installation.

Install packages:

sudo apt-get install build-essential cdbs fakeroot dh-make debhelper debconf libstdc++6 dkms libqtgui4 wget execstack libelfg0 dh-modaliases

Since I'm on 64-bit, I had to add to that:

sudo apt-get install ia32-libs
Download the latest Catalyst package:

cd ~/; mkdir catalyst11.9; cd catalyst11.9
wget http://www2.ati.com/drivers/linux/ati-driver-installer-11-9-x86.x86_64.run
or for the new latest
wget http://www2.ati.com/drivers/linux/ati-driver-installer-11-11-x86.x86_64.run
Create the deb packages

sh ./ati-driver-installer-11-9-x86.x86_64.run --buildpkg Ubuntu/oneiric
Install the deb packages

sudo dpkg -i fglrx*.deb
Create basic aticonfig xorg file

sudo aticonfig --initial -f
Set PCS:

sudo aticonfig --set-pcs-str="DDX,EnableRandR12,FALSE"
Restart
Opened amdcccle with sudo and configured to dual screen (proceeded to get kicked out and log back in).
At this point, go to the Displays option in ubuntu (dropdown from top-right screen) and uncheck mirror and set the desktop to span the two monitors.

And now I can finally enjoy OpenCL with two monitors in 11.10 amd64.


Why does my screen not return to full brightness when waking a Lenovo B570 from sleep mode?

I think you should file a bug in Launchpad in which you will explain the steps to reproduce the bug and specify that it happens only after wake from suspend. If you are unsure which package it affects, then for your kind of problem you can choose the kernel, as it is explained in this answer about how to report bugs.


Updated to 15.04, no sound other than startup sound

Well, apparently installing "PulseAudio Volume Controller" and fiddling in the Configuration solved it. The computer still doesn't recognize the Speakers as plugged in (it literally says "unplugged") but it does work when I select it as an output...


Kubuntu 15.10 does not recognize my graphics card

Hit Alt+F2 to fire Krunner and then type Additional Drivers.
Open the tool and it should show the drivers available for your GPU. Go ahead and activate it.
You will need to reboot your system in order for the driver to work.


Open pwd protected http stream in vlc from CLI

From the client side just run

vlc http://YOURUSER:YOURPASSWD@192.168.1.67/videostream.asf


How can I download a video that are in screencast.com?

Try this Firefox Addon Here

It's called VideoDownloadHelper.


Installing Ubuntu on an old PC running Windows 8 Consumer Preview

This is a fairly common problem with the "make bootdisk" program. Try "unetbootin" and let us know if this worked.


Pasting multiple lines into the terminal aborts after certain commands

I think this is happening because you are running these commands into a terminal, and some commands interfere with the terminal configuration. E.g., when sudo asks for a password, it will clear the terminal buffer, so you cannot pre-type your password: you cannot do sleep 5; sudo ls, then type your password during sleep. Same with rm asking for confirmations.

I can get the same effect with:

ls
script -c ls -f /dev/null
pwd

Meaning, if I mouse-paste these in Konsole, pwd doesn't get executed. Here, the second command surely messes with the terminal configuration, which leads me to believe that so does adb shell (but probably not abd doesnotexist).


How to prevent installation of Ruby Version Manager on 12.04 Server from failing? (works on Desktop)

The problem resides on the creation of the user on the server side. The user was created using the terminal and no parameters were used on the creation.

As the thing goes, it leaves the new user using the "sh" shell from POSIX, that is not supported by Ruby Version Manager. Changing the shell to bash solve the issue.

You can do this for an already-created user running this (if you are logged in as the user you want to change the shell to):

sudo chsh -s $( which bash ) $USER

Or you can run this and change the bash for any user:

usermod -s /bin/bash user

** Thanks mpapis, developer of RVM, for the debugging :)


First, I advise you against doing this from within your Ubuntu. It would be best if you booted from a live Ubuntu USB drive. (I assume you know how to do this, since you have Ubuntu installed).

Then, using the GParted in the live mode, resize sda4, the extended partition, to occupy the rest of the available space. And I mean ALL of the unallocated space, since you can only make 3 primary partitions and 1 extended, so you can't add a partition without deleting one, or resizing the extended partition. So keeping any free space outside the extended partition is pointless. You can unmount the swap without worry - the live mode automatically activates swap.

The way I look at it, you can't add space to /, since you'll have to move the /home partition, and that might take a long time (but can be done) and maybe risky. It can be done - right click the home and swap partitions, choose Resize/Move, drag the partitions to the end of the free space. Then extend the sda5 to as much as you need. Apply.

I recommend two options with minimal risk:

Delete the swap space, extend sda6 (your home partition), add swap back again. -or-
Add a new ext4 partition in the free space within the extended partition.

It looks to me that you will have to edit your /etc/fstab either way: for re-adding swap in (1) or adding the new partition in (2). I prefer and suggest (2). Before you go about (2), think of where you want this extra space to be. I prefer a directory in my home folder (like /home/muru/devel). So decide where you want it to be. Let's call it /path/to/some/folder. In your Ubuntu installation, do:

sudo mkdir -p /path/to/some/folder

This will create the necessary folder(s).
Now boot to live Ubuntu and open GParted. To add a new partition:

Right click on the unallocated space within the extended partition, choose New, select the required size and format (ext4 recommended).
Apply (the green tick or the Apply All Operations entry in the Edit menu).
Right click on the newly created partition, choose Information and copy the UUID. It looks like this: 5784865f-7c42-4d8b-b692-2d27e06af9c1.
Open a terminal, and execute these commands:

sudo mount /dev/sda5 /mnt
sudo gedit /mnt/etc/fstab

Add this line to fstab, after replacing the value with the UUID you copied earlier (and ext4 with the filesystem type, if you chose a different one):

UUID=5784865f-7c42-4d8b-b692-2d27e06af9c1 /path/to/some/folder ext4 defaults 0 0

I recommend you use a directory that is empty and one you will use a lot for /some/path.
Save, exit and reboot. You'll find the new partition mounted at /path/to/some/folder, but it will likely be owned by root. Do, in your installed Ubuntu,:

sudo chown $USER:$USER -R /path/to/some/folder

You'll need to do this since mounting may make root the owner of the folder.
Here $USER is a variable that usually automatically contains your username, You can directly use your username in place of it.

Now you have all the space you need in /path/to/some/folder. You have ~14 GB of free space in your /, and for most users, that's plenty, especially given a separate /home.


Screen goes black when trying to install Ubuntu 12.04.3 LTS on Lenovo Ideapad Z510 with Free DOS

This is a new Haswell system. They generally only work with the newest 64 bit versions of Ubuntu as the hardware is very new. Linux takes 6 months or more to catch up with new hardware as vendors do not directly support Linux. Intel has been good about updating, but those updates are only in 13.10 and should be in 12.04.4 that will be out shortly. Or even better 14.04 in April.

Do you have dual video or just nVidia. And then which video is it booting with. If nVidia you need nomodeset, but Intel often needs other settings.

Shows install with screen shots for both BIOS & UEFI, so you know which you are using. Your system will boot in either mode.
https://help.ubuntu.com/community/UEFI

Lenovo Community Bios Access
http://forums.lenovo.com/t5/IdeaPad-Y-U-V-Z-and-P-series/z580-can-t-access-bios-setup-or-boot-menu-after-changing-to/td-p/812737/page/2


How to redirect a subdomain to main domain - NGINX Ubuntu

In your /etc/nginx/sites-available/play.example.com file (or whatever you might have it called on your machine), you'll need to add a rewrite that points to example.com like so:
server {
    ...
    server_name play.example.net;
    rewrite ^/(.*)$ http://example.com/$1 permanent;
    ...
}

Once this is done, save the file and check that the config is good with: nginx -t. So long as no errors are returned, reload nginx:
sudo service nginx reload

Hope this gets your site back online


I had a similar problem, I just recently upgrade from 11.10 to 12.04 . In my case i was able to hear sound on System -> Sound -> Test Sound. But I couldn't hear a sound on youtube or while playing mp3's on rhythmbox.

I followed instruction at https://help.ubuntu.com/community/SoundTroubleshootingProcedure
solution for 12.04
And now everything is back to normal.

I hope it helps

Cheers,

Bram


redmine 2.4 installation on 14.04 fails on bundle install

Locate where 'Gemfile' is. CC into that directory and run

bundle install --without development test


Japanese and european languages font list

I do not think such a list even exist! Fonts are invented or modifyed every second.
But don't let that stop you, just download the fonts you like and install, for that end use font-manager.
AFAIK. Ubuntu supports all kinds of fonts, I even have Futhark installed (Old Norce Runes).


Cannot autologin on Ubuntu 14.04 after updates

After some trying, I got it works again. I don't know which solution worked, but I did the following:
In /etc/lightdm/lightdm.conf I add:

  pam-autologin-service=lightdm-autologin

I create new file /etc/lightdm.conf.d/50-myconfig.conf containing the following as explained here:

[SeatDefaults]
autologin-user=bagustris

Another work around is to check /etc/pam.d/lightdm-autologin. Make sure no strange or permission issue, and refer login setting found to this "ligthdm-autologin".

There is another work around as listed from here and here:

sudo chmod a+r /etc/shadow
sudo chown user:user .Xauthority


Ubuntu 16.04 boots into emergency mode intermittently

My Ubuntu had a similar problem as I'd removed an USB drive without removing the /etc/fstab entry.  Once I commented the usb drive line out and rebooted every thing was ok.  Perhaps your drive is not ready when the VM boots.  See if you can attach it after boot.


As this Ubuntu wiki says:

  The file manager creates thumbnails to preview image and video files,
  and can also preview text files and sound files......The icon for
  plain text files looks like a piece of paper with text inside. The
  file manager automatically extracts the first few lines of text from
  the file and shows it in the icon. You can turn this feature on or
  off, or turn it on only for files on your computer and local external
  drives.

To turn off the feature:

Open nautilus and go to Edit -> Preferences.
Go to the Previews tab and under the Text Files section, select the menu for Show text in icons and select Never.
Close the Preferences.

Now, we come to changing icons.

I've Faenza Icon Theme installed, so I go to /usr/share/icons/Faenza/mimetypes/scalable and there is already an icon file named text-x-python.svg, and the same shows for all the .py files.

If you've any icon theme installed you should go to the directory for that theme and make the changes, if not you should change the icons in the /usr/share/icons/gnome directory.

Additional Links: You can read more about File Manager Preferences here: https://help.ubuntu.com/11.04/ubuntu-help/nautilus-prefs.html.


Finally after trying a number of things I installed the 3.17 kernel. I purged xorg-edgers and installed nvidia-331 from apt-get and I now have a working setup.

I ran into two problems, the first was that I could not change the resolution on my laptop monitor from 640x320. Deleting /etc/X11/xorg.conf resolved that. The second was that when I logged in, unity crashed. Deleting ~/.config/dconf/user reset all my settings but unity worked as it should.


Make Firefox user agent appear as Windows?

I'd imagine that they're just querying the user agent, which you can easily customize with an add-on like the User Agent Switcher.

Once you've installed that, Google can provide you with any number of Windows/Firefox user agent strings, and you can use the add-on to send the user agent of your choice when connecting to your banking site.

As an example, here's my user agent from Firefox on Windows 7.

  Mozilla/5.0 (Windows NT 6.1; WOW64; rv:18.0) Gecko/20100101 Firefox/18.0


After dual boot with Windiws 10, Ubuntu can't start

I guess you allready have updatet or reinstalled grub?

sudo grub-install /dev/sdX (replace sdX with your device..)
sudo update-grub

?


I am using a fresh installation of Kubuntu 13.04.

After installing the Russian locale and rebooting, I had the same problem. It was indeed due to the mismatch of the locale name in .kde/env/setlocale.sh.

So repeating the workaround:

LANG=en_US.ISO-8859-1 =>>>
export LANG=en_US.utf8

and then rebooting fixed the problem totally!

Funny enough I've understood that there is a problem in the first place not in the konsole (this symptom is well present), but while browsing the data with Dolphin and seeing that all Russian-encoded files were abracadabra-named.


conflict between ubuntu 18.04 repository python numba and nvidia-cuda-toolkit?

I had the exact same problem. I solved this by installing miniconda and the conda install the two packages:

conda install cudatoolkit
conda install numba

Then it works, but not really beautiful.


Ubuntu MATE 18 workspace configuration file?

Physically the settings are saved in ~/.config/dconf/user, you need gsettings and/or dconf to read/write values to this file.

Below is the list of GUI options and their corresponding CLI equivalent:

Switcher

[ ] Show only the current workspace  (default is false)

dconf write /org/mate/panel/objects/workspace-switcher/prefs/display-all-workspaces 'false'

[o] Show all workspaces in N rows (default is 1 row):

dconf write /org/mate/panel/objects/workspace-switcher/prefs/display-all-workspaces 'true'
dconf write /org/mate/panel/objects/workspace-switcher/prefs/num-rows 1

Workspaces

Number of workspaces (default is 4)

gsettings set org.mate.Marco.general num-workspaces 4

Workspace names

gsettings set org.mate.Marco.workspace-names name-1 'Workspace 1'
gsettings set org.mate.Marco.workspace-names name-2 'Workspace 2'
gsettings set org.mate.Marco.workspace-names name-3 'Workspace 3'
gsettings set org.mate.Marco.workspace-names name-4 'Workspace 4'

[ ] Show workspace names in switcher (default is false)

dconf write /org/mate/panel/objects/workspace-switcher/prefs/display-workspace-names 'false'

[ ] Allow workspace wrap around in switcher (default is false)

dconf write /org/mate/panel/objects/workspace-switcher/prefs/wrap-workspaces 'false'


How to detect if the user has clicked on "Quit" in a zenity list

$? is the exit status, which is an integer and can never be "Quit". But, if the user did click on "Quit", zenity will exit with status 1, and 0 if the user clicked the OK button.

$ choice=$(zenity --list --text "Users are listed below." --title "Result" --ok-label="Back to Menu" --cancel-label="Quit" --column=Users $(cut -d : -f 1 /etc/passwd))
# clicked Quit
$ echo $?
1

So you could do:

choice=$(zenity --list --text "Users are listed below." --title "Result" --ok-label="Back to Menu" --cancel-label="Quit" --column=Users $(cut -d : -f 1 /etc/passwd))

if [ "$?" != 0 ]
then
    exit
fi

if [ "$choice" = "root" ]
then
    echo 'You have clicked on root'
fi

It's better to compare with 0, since other failure conditions may result in exit status other than 0 or 1.


Installing Ubuntu Server 14.04 on a pre-built RAID Array

Okay, figured it out ...

The default location for the grub install in my case was /dev/md126p1 ... But I needed to change it to /dev/md126 ...

This is a common occurrence for me with the GRUB installation with Ubuntu Server editions, that the default location to install  GRUB, is always wrong. I have always had to 'execute a shell' to find out the name ubuntu has given the drive I wish to install it to ...

With Ubuntu Desktop installation, you are shown what drives are available to install GRUB onto, and makes it much easier to decide where to install it to. Does anyone think they should incorporate this into the server edition? Or does everyone think I'm just an idiot Lol?


The ffmpeg versions available in the Ubuntu repositories may not be up to date. Therefore, if you want the latest features, download the latest ffmpeg static build (32/64) with given link and follow the instructions.

  http://johnvansickle.com/ffmpeg/

Download and extract the latest archive:

wget https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-64bit-static.tar.xz
tar xvf ffmpeg-git-*.tar.xz

Place the ffmpeg and other binaries whereever you need to run that command, for example into /usr/local/bin in order to have it to your $PATH:

cd ./ffmpeg-git-*
sudo cp ff* qt-faststart /usr/local/bin/

Run ffmpeg using: ffmpeg


Power Management Settings Changes Not Taking Effect

I have the same problem since I updated from xubuntu 18.10 to 20.04 (full reinstall then copy/past my home folder)
I noted that in my case when I change Power Management settings in the UI, they are not reset if I close the setting UI or even reboot my computer. The values I have set are still there but seem to have no effect.
I also tried to run Power Management in debug mode and it correctly logs all setting changes.
The problem only impact Display tab settings (time before suspend/shutdown, screen luminosity reduction, etc). Other Power Management settings (such as locking on suspend, key settings, etc) work fine.
As a temporary workaround I use the "presentation mode" of the power managment widget to inhibit hibernation.


Why is there 8GB worth of files in my /tmp?

How about using the inotify-tools package?

You can install it and try the following:

$ cd /tmp
$ lsof `inotifywait -e create --format "/tmp/%f" .`

If you create a file in another terminal, like:

$ cat > /tmp/aa

the lsof output might show something like

COMMAND  PID    USER   FD   TYPE DEVICE SIZE/OFF   NODE NAME
cat     3576 marcelo    1w   REG    8,1        0 274376 /tmp/aa


how to generate a new .desktop file (in /usr/share/applications) after installation?

Can you not just copy one of the other desktop entries? I made this one and just called it phpstorm.desktop and it works:

[Desktop Entry]
Encoding=UTF-8
Name=PhpStorm\nComment=PhpStorm
Exec=/opt/PhpStorm-181.4445.72/bin/./phpstorm.sh
Icon=/opt/PhpStorm-181.4445.72/bin/phpstorm.png
Terminal=false
Type=Application
Categories=GNOME;Application;Development;
StartupNotify=true


Uninstall package locally installed with checkinstall

You didn't read man checkinstall and didn't save any data from it.

To uninstall software that was installed via make, thusly:

cd vim/src
make uninstall


If you have already typed a command and forgot to use the &, you can put a foreground job into the background by typing ^Z (Ctrl-Z) to suspend the job, followed by bg to put it into the background:

$ sleep 99
^Z
[1]+  Stopped                 sleep 99
$ bg
[1]+ sleep 99 &

You can bring a background job into the foreground, so that the shell waits for it again, using fg:

$ jobs
[1]+  Running                 sleep 99
$ fg
sleep 99

You can list the jobs of the current shell using the jobs command.

$ jobs
[1]+  Running                 sleep 99

[source]

If you want to run spacial job in foreground/background just use process id to move it to foreground/background. see this example:

$ sleep 99     # run first job
^Z
[1]+  Stopped                 sleep 99
$ bg
[1]+ sleep 99 &
$ sleep 1000   # run second job
^Z
[2]+  Stopped                 sleep 1000
$ jobs         # view all jobs
[1]-  Running                 sleep 99 &
[2]+  Stopped                 sleep 1000
$ bg %2        # move jobs number 2 to run in background
[2]+ sleep 1000 &
$ jobs         # view all jobs
[1]-  Running                 sleep 99 &
[2]+  Running                 sleep 1000 &

Both of jobs are running in background.

$ fg %2      #switch to second job and run it in foreground

  sleep 1000      #sleep 1000 is now running in foreground

Note: You need to kill these jobs by using kill %processID.

example: kill %2 (kill second job with process ID #2)


Partitions are gone after installing ubuntu 13.10

It depends on the options you chose when installing Ubuntu.  If you chose the incorrect option (basically over-write everything), then Ubuntu installer re-partitions the entire drive.  There is no recovery from that unfortunately.

You have to be very careful choosing the correct partition option otherwise you will lose all data.  And there is no coming back from that.

If you cannot see other partitions then I think the news is not good.


How does ub14.04.5 FF56 successfully resolves an Internationalized Domain Name?

IDN domains are translated before they're queried. The browser does this conversion.

You can install the tool idn to translate - sudo apt-get install idn.
Enter the domain you want to translate, and press enter:

$ idn
libidn 1.29
Copyright 2002-2014 Simon Josefsson.
GNU Libidn is free software with ABSOLUTELY NO WARRANTY.  For more
information about these matters, see <http://www.gnu.org/licenses/>.
Type each input string on a line by itself, terminated by a newline character.
løk.no
xn--lk-lka.no

You can also specify it as a parameter:

$ idn løk.no
xn--lk-lka.no

You can also use a website tool, like https://www.punycoder.com/

The translated name can then be resolved using standard command line tools like dig or nslookup, or used in non-IDN-aware applications.

You can also pipe this straight into nslookup:

$ idn løk.no | nslookup
Server:         10.1.12.15
Address:        10.1.12.15#53

Non-authoritative answer:
Name:   xn--lk-lka.no
Address: 212.125.204.196


After a bit more investigations I found that the localization files are screwed, my local time is Europe/Dublin which is and always been the same as Europe/London.
I changed my timezone for London and the time is back to normal.
It looks like dublin file in /usr/share/zoneinfo/ is wrong, pointing to wrong time or so ???


Shell asks me to install IDLE despite it being already installed

From your comments it appears that you don't have IDLE installed, so open the terminal and type:

sudo apt-get install idle idle3

There are two different IDLEs (IDLE 3 is an IDE for Python 3) and that command will install them both.


According to your followme.conf, you created a followmeid 350, which dials the extension 6002 in the context default (or hand). The followmeid has no relation to the extension to dial. You need to have either a pattern (like _6XXX) or the extension 6002 declared in the context you are trying yo use.

Your hand context has only 3 extensions:

16175551212
1
2

You could create something like this (considering you are trying to reach user SIP 350):

exten => 6002,1,Dial(SIP/350)

or

exten => _6XXX,1,Dial(SIP/350)

Just make sure to add any of those lines inside the hand context and change the followmeid to use that context.

Quick tip: The leading underscore in the exten statement is only needed when you are using patterns.


What Controls theme elements that impact windows and buttons?

In a short summary;

Current Theme (as it is now called in Gnome's Tweak Tool) is not a good name for Window Manager / Metacity Theme, which controls borders/decorations (including titlebars and buttons) of almost all windows of applications, dialog boxes, etc.
Cursor Theme only controls the shape and color of the cursor as seen in various mouse movements and statuses.
Icon Theme controls all the icons you see in file managers, Unity Dash, Launcher and Panel (folders, files, applications, etc.), and in most applications (but not all).
GTK+ Theme controls all the other decorations inside window borders, including toolbars, menubars, tabs, etc.) and also the Unity panel at the top.

You will have a better appearance if you choose ubuntu-mono-dark/light icon theme instead of Unity icon theme seen in your screenshot (which shouldn't be listed at all, I think). As you know Ubuntu default theme (both window and gtk) is Ambiance.

But you can get many other themes as well. You should only make sure they are compatible with your system, especially Gnome 3.6 as many things have changed recently.


After update to 18.04 the screen brightness slider stopped working

Thanks to @Raffa for the solution. It did not work out of the box, i.e. when I applied it, it did not change anything, because it reinstalled the driver in the nvidia-driver-390 version. Raffa was nevertheless right about the source of the problem and this is what I did to fix it:

I first added the following PPA:
How do I install the Nvidia drivers?

Then, I applied a fix to this bug:
https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-390/+bug/1768050
and finally after:

sudo apt purge nvidia-* && sudo ubuntu-drivers autoinstall

I had a new version of the driver, i.e. nvidia-driver-415 installed, which works smoothly with my 4.15.0-101-generic kernel. Thanks!


Run script at boot/startup in Ubuntu 12.04 x64 Server

Given your script is bash and the path is /root/fedina/server/script you could have:

##!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

bash /root/fedina/server/script

exit 0

Note: Don't forget about the execution bits (eg. chmod a+x /etc/rc.local)


I ran `sudo kbd_mode -s` and now I can't do anything

sudo kbd_mode -s switches the keyboard into raw mode, which stops the terminal from interpreting anything you type, such as Enter, so is only usable non-interactively to get unprocessed key-strokes.  This is why man kbd_mode warns:

Warning: changing the keyboard mode, other than between ASCII and Unicode, will  probably  make  your keyboard unusable.

Luckily there is a special key combination that can escape raw mode if it hasn't been disabled: Alt+SysRq+R
Otherwise, as you're not in an xterm, there is no other escape and you'll have to reboot.  Trying the rest of the REISUB emergency reboot sequence Alt+SysRq+(EISUB), waiting a second or two between each letter, is the best way to do this if enough of it works.


How to make this heart (♥) using keyboard?

I use compose keys for all those special characters outside the English language.  You can also type a heart with them.

System -> Preferences -> Keyboard Preferences

Tab "Layouts", button "Options", choose a "Compose Key Position" (I set it to Right Alt)

Now, anywhere you can type Right Alt + < followed by 3 (or your compose key of choice instead of the Right Alt of course)

♥

btw, don't overdo the hearts...

This works intuitively for all kinds of special characters!

Right Alt + c and = gives €

Right Alt + s and s gives ß

EDIT:

You can find more compose key sequences here


Nvidia driver cripples my laptop Ubuntugnome 13.10

GeForce 555M uses comes with an optimization technology called Optimus. Optimus watches the resource load of the computer and automatically switches between the discrete GPU and the integrated low power one on the MB. The problem is that Optimus only supported on Windows. This why you get so many more hours of use on Windows - the majority of your computer time is probably spent using the onboard GPU and not the 555M. In Ubuntu, it's seeing the card and installing it (probably using the Nouveau based open source Nvidia drivers) so your low power on board card is being bypassed. There is a project called Bumblebee that is working on adding Optimus support to Ubuntu, with power management issues being a primary goal of the project. More information can be found on the Ubuntu Wiki


If you just need to list the sudoers listed in the sudo group, I think that the best way to do it would be to run this command (which should be computationally lighter than any of the other commands in this answer):

grep -Po '^sudo.+:\K.*$' /etc/group

Also as suggested in the comments by muru, the format of the entries in /etc/group can be easily handled by cut:

grep '^sudo:.*$' /etc/group | cut -d: -f4

Also again as suggested in the comments by muru, one can use getent in place of grep:

getent group sudo | cut -d: -f4

Any of these commands will print all the users listed in the sudo group in /etc/group (if any).

Command #1 breakdown:

grep: Prints all the lines matching a regex in a file
-P: makes grep match Perl-style regexes
o: makes grep print only the matched string
'^sudo.+:\K.*$': makes grep match the regex between the quotes

Regex #1 breakdown:

Any character or group of characters not listed matches the character or the group of characters itself
^: start of line
.+: one or more characters
\K: discard the previous match
.*: zero or more characters
$: end of line

Command #2 breakdown:

grep: Prints all the lines matching a regex in a file
'^sudo.+:\K.*$': makes grep match the regex between the quotes
cut: Prints only a specified section of each line in a file
-d:: makes cut interpret : as a field delimiter
-f4: makes cut print only the fourth field

Regex #2 breakdown:

Any character or group of characters not listed matches the character or the group of characters itself
^: start of line
.*: zero or more characters
$: end of line