tee: /proc/acpi/ibm/fan: Invalid argument

The problem is not with your tee command - although since you are already in a root shell you could have used a simple redirection echo disable > /proc/acpi/ibm/fan (and could certainly have removed the sudo).

Although "everything in Linux is a file", the reality is that "files" in /proc are really interfaces to the running kernel and don't behave exactly like regular files - if we use strace we can see that the error doesn't really come from tee, but from the underlying write call to the open file descriptor (I changed the syntax from a pipe to a here-string to make sure that we are tracing the tee not the echo):

root@t400s:~# strace tee /proc/acpi/ibm/fan <<< 'disabled'
execve("/usr/bin/tee", ["tee", "/proc/acpi/ibm/fan"], [/* 23 vars */]) = 0
.
.
.                              = 0
openat(AT_FDCWD, "/proc/acpi/ibm/fan", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3
read(0, "disabled\n", 8192)             = 9
write(1, "disabled\n", 9disabled
)               = 9
write(3, "disabled\n", 9)               = -1 EINVAL (Invalid argument)
write(2, "tee: ", 5tee: )                    = 5
write(2, "/proc/acpi/ibm/fan", 18/proc/acpi/ibm/fan)      = 18
.
.
.
+++ exited with 1 +++
root@t400s:~#

The reason the argument is invalid is that by default, the thinkpad_acpi module does not enable fan control - if you cat the file, you will likely see just a few lines as follows:

$ cat /proc/acpi/ibm/fan
status:     enabled
speed:      1838
level:      auto

In order to enable fan control, you need to pass an option to the module during loading, which you can do using a configuration file:

$ cat /etc/modprobe.d/thinkpad_acpi.conf
options thinkpad_acpi fan_control=1

which you can either create in a text editor, or using

echo 'options thinkpad_acpi fan_control=1' | sudo tee -a /etc/modprobe.d/thinkpad_acpi.conf

(this is just a regular file, so no issues with tee this time). Then you will need to reboot - unfortunately it does not seem to be possible to remove and re-load the thinkpad_acpi module on the fly.

After rebooting to re-load the module with its new option, you should see that it now lists some additional fan_control commands:

$ cat /proc/acpi/ibm/fan
status:     enabled
speed:      3737
level:      auto
commands:   level <level> (<level> is 0-7, auto, disengaged, full-speed)
commands:   enable, disable
commands:   watchdog <timeout> (<timeout> is 0 (off), 1-120 (seconds))

Now you should be able to enable/disable/modify the fan parameters, either by writing to /proc/acpi/ibm/fan directly with a command such as your tee, or using the thinkfan utility described in your link.

For further background about /proc, see What happens when I run the command cat /proc/cpuinfo?


Wireless and trackpad disabled in Ubuntu 13.04 after update

Posting the solution I found for the sake of others:

I checked and could not find the device for either my trackpad or my wireless card, so I decided to try reinstalling the driver. I came across http://kuscsik.blogspot.com/2007/06/how-to-install-intel-4965-wireless.html which explained how to install the driver for my computer (Dell Inspiron 1720). I only had to run the one command sudo modprobe iwl4965, and my wifi immediately started working again. I ran sudo apt-get update and then sudo apt-get upgrade, rebooted, and then the trackpad worked perfectly as well.


Can a right mouse click be used to shut down Ubuntu? Version 16.04 LTS

Yes, you can add shutdown option to right click context menu. With the right tool , it is possible to do so.

First, open up a terminal and type:

sudo apt-get install nautilus-actions

This will install Nautilus-Actions Configuration Tool, which I mean by "right tool" thus making it essential in order to modify right click.

Once the installation has finished, launch nautilus-actions-config-tool.

Define a new action by click top left icon. Then:

Fill the desired name on Context lable field, "shut down" for example.
Also make sure you tick Display item in location context menu, so if you right click on blank space (e.g. desktop). You also get the defined action.

Click Command tab, type /sbin/poweroff on Path field. Then press Ctrl+S to save the change. Now "Shut Down" should appear as option on right click.


How do I fix this error installing Laravel?

You need to install php zip extension.

Something like

sudo apt-get install php7.0-zip

should get you on the right lines

Depending on installed php version you may need to change the package you need to install, eg

php-zip
php5.4-zip
php7.0-zip
php7.1-zip

Easiest way to find php version is to run

php -v


Many software applications are packaged and exist in the official repositories.
The RedSocks is packaged for all current Ubuntu versions.
To install it you need to execute the following commands in the terminal:
sudo add-apt-repository universe
sudo apt-get update
sudo apt-get install redsocks

According to its file list it has configuration files in the /etc folder:

/etc/default/redsocks
/etc/redsocks.conf

The details about the application may found in man redsocks (or online). Also configuration files usually contain comments, so such files are self-explaining.


ubuntu 18.04 - Kb layout xkb-options are ignored after reboot

As a workaround you may want to try to edit the /etc/default/keyboard file and replace

XKBOPTIONS=""

with

XKBOPTIONS="altwin:swap_alt_win,caps:ctrl_modifier"


Error formatting volume: No such file or directory

I have finally solved it with help of GParted. All I had to do was reformatting. Following is what I did:

Install GParted:

  sudo apt install gparted

Right click on the disk (which was listed with a red exclamation!)
Select Format to
Select ext4
Click on the Apply All Operations button

That solved it!


Updater keeps saying Failed to download repository information Check your Internet connection. on 12.10

Same thing happened to me. I went to the software updater setting -> Other Software tab and found those PPAs and removed them.It should work.


Stuck on boot screen forever after upgrade to 11.10

I fixed it with this:

Enter in safe-mode (dont remember the exact name, but for commandline)
Type sudo dpkg-reconfigure lightdm and choose the lightdm.
Reboot and done!


Unity Launcher "application start" feedback in custom theme

Well, this is an indirect answer, but you can try changing unity settings where it defines launch animation (I'm not sure how will it react with Moka theme)

Please check this answer for configuring unity:
https://askubuntu.com/a/294604/14356

The part that you're looking for is on setting "Launching animation" to "Pulse"

On the other hand, if it screws the theme, you should address it towards the creators of Moka theme.


Cannot delete older kernels - boot partition full

You should remove header and image like this:

apt-get purge linux-headers-x.x.x-xx  linux-image-x.x.x-xx

For example in your case:

apt-get purge linux-headers-4.8.0-22  linux-image-4.8.0-22

If apt still fails to remove the packages, you can use

dpkg --purge --force-all linux-image-4.8.0-22-generic linux-headers-4.8.0-22 linux-headers-4.8.0-22-generic

After that:

apt-get -f install


I think the "AZip" utility you found (https://azip.sourceforge.io/ ) just happens to be called that. It is just a Zip reader/writer. #redherring :-o
Similarly there is one on the Google Play store of this name too.
What was the source of the .azip file?  I find a mention of a .azip file format here https://www.agrisatwebgis.com/media/manuals/AgriSatwebGIS_BASIC_USER_GUIDE.pdf
What is the output of the Linux file command? This should help you identify the file. e.g.
 # more hello.txt
 Hello World
 # file hello.*
 hello.txt:    ASCII text
 hello.txt.gz: gzip compressed data, was "hello.txt", last modified: Tue Feb  9 22:20:02 2021, from Unix, original size modulo 2^32 12
 hello.zip:    Zip archive data, at least v1.0 to extract

Hope that helps you. Regards, Andi


How to make a mesh by using python script on Blender

You should search in similar scripts. As you might know, Blender comes with addons written in Python. There are some available addons about the creation of meshes. You have to enable to use them, but they are installed on your computer. Search in /usr/share/blender/addons, to see them. Maybe you can do some reverse engenieering to answer your question.

Copy your own script to this folder. There is also "install from file" in preferences. You have to enable the scripts in preferences. It's a bit hidden. On the upper left of the default window you can see an exclamation mark. Click on it and select preferences from dropdown menu. Then you have to increase hight of this bar, to see the preferences. On screenshot you can see increased preferences bar. Select addon tab. On the right hand, you can mark "enable addon". To make this change permanent, you have to save them. I have forgotten about the shortcut, search for it, maybe its Ctrl+U.

Well, when I used Blender, there was an option to run Scripts. Now, I can see only a Console.


It seems you never performed a system upgrade.
As you can see in your screenshot you have Firefox version 18 installed and version 41 is available.

Run these commands:

sudo apt-get update
sudo apt-get dist-upgrade

to upgrade Firefox to version 41 and many many other things.

After upgrading you can install the plug-in.


How can I enable user switching in Xubuntu?

From TuKsn's link, right click on the Whisker icon (top right) and you get a 'Properties' menu entry, from there, switch to the 'Behavior' tab and enable the 'Switch Users' option.


Sound freezes (beeping) - sound blaster x-fi HD

Try pulseaudio -k, followed by pulseaudio, run in a terminal.

If that fails, try sticking the text in the following link in a shell script called alsacontrol.sh(Using text editor), making it executable from the permissions tab when you right-click it, and then run it when needed by opening a terminal and running ./alsacontrol.sh:

http://paste.ubuntu.com/1094899/

How this works:

Pulseaudio is a layer used for bringing sound from most applications to ALSA, which then works with hardware. If Pulseaudio is hanging, then pulseaudio can be restarted. If ALSA is malfunctioning, you may restart ALSA using the second script.

Reference(Script moved to Pastebin in case source is down): http://ccrma-mail.stanford.edu/pipermail/planetccrma/2007-July/013484.html


Phoronix Bench Marks
Phoronix Has done a number of bench marks featuring AMD Ryzen 9 3900X
Here is one with AMD Ryzen 9 3900X vs. Intel Core i9 9900K using Ubuntu 19.10:
https://www.phoronix.com/scan.php?page=article&item=3900x-9900k-400&num=1
More can be found here:
https://cse.google.com/cse?cx=partner-pub-0253814508491313:1305299758&ie=UTF-8&q=Ryzen+3900&sa=Search&ref=


Wrongly named variables in mysqld.cnf (Ubuntu 16.04)

I downloaded the mysql-server-5.7 package to test:

$ apt-get download 'mysql-server*'
Get:1 http://mirror.cse.iitk.ac.in/ubuntu xenial-security/main amd64 mysql-server all 5.7.12-0ubuntu1 [10.1 kB]
Get:2 http://mirror.cse.iitk.ac.in/ubuntu xenial-security/main amd64 mysql-server-5.7 amd64 5.7.12-0ubuntu1 [2,584 kB]
Get:3 http://mirror.cse.iitk.ac.in/ubuntu xenial-security/main amd64 mysql-server-core-5.7 amd64 5.7.12-0ubuntu1 [7,503 kB]
Fetched 10.1 MB in 0s (63.8 MB/s)
$ dpkg-deb --fsys-tarfile mysql-server-5.7_5.7.12-0ubuntu1_amd64.deb| tar x ./etc/mysql
$ grep -e table_cache -e log_slow_queries -e log-queries-not-using-indexes ./etc/mysql/mysql.conf.d/mysqld.cnf
#table_cache            = 64
#log_slow_queries       = /var/log/mysql/mysql-slow.log
#log-queries-not-using-indexes

All three lines were commented out. I'm not sure a commented-out line is a big deal. The package maintainer probably ignores them.


Right-to-Left script fail with Flash Player

According to this post, the problem is due to a shortcoming of the version of Adobe Flash that the web developer used.

There are no known user workarounds. The problem must be corrected by the web developer.


The correct name of the package is libpthread-stubs0-dev:
sudo apt-get install libpthread-stubs0-dev


How Can I install A Rhythmbox Plugin On My Ubuntu VPS?

Read the README

less ./README

type q to quit less when done.

I assume you will run the installer

 ./INSTALL

You may need to change the permissions first

chmod a+x ./INSTALL


Launcher does not pop in - is out permanently

I presume you want your launcher to dodge windows on maximize:
http://www.webupd8.org/2013/02/how-to-get-unity-launcher-window-dodge.html  - this link explains how.

For plain ol' hiding all the time, the question was answered, see here for instructions:
Unable to use autohide launcher in 12.10

Enjoy your Ubuntu! :D


salam

You can always create a bash script and change your language before running poedit or any program for that matter. for example if poedit runs with command /usr/bin/poedit, you can create a script file with these lines:

#!/bin/sh
export LANG=en_US.UTF-8
exec /usr/bin/poedit $@


Blank screen with blinking cursor after install

Try editing the boot entry and placing "nomodeset" (without the quotes) as an option.


Is there any way to save alsamixer settings other than alsactl store?

I have the same problem on my pc:
 It appears that effectively alsa restores  SPDIF "unmuted" state during boot, but then  pulseaudio mutes it when user session  starts.
To verify that alsa restore is ok,  just run sudo alsactl restore in a terminal and look if it  unmute SPDIF.
To verify that pulseaudio is the problem , just run pulseaudio -k to relaunch pulseaudio : you should see that SPDIF is muted.

As I don't know how to set pulseaudio for not muting, this is a workaround inspired from there  :

Try if this command unmutes SPDIF channel:
amixer set IEC958 unmute
If yes, create .unmute hidden file  :
gedit .unmute
paste 4 lines in it:

#!/bin/bash
sleep 10
/usr/bin/amixer set IEC958 unmute
exit

save and close.
Now, edit .profile file :
 gedit .profile
add this line at the end:

bash .unmute &

save and close.

Now test reopening session or rebooting .

Note: in the above link from Mageia, they use /etc/rc.local to run alsactl restore at boot time , it is also ok.   But using .profile and amixer, no need to "sudo" and it will unmute  at every session start for your login.


Searching techniques via Nautilus or otherwise


Ubuntu 20.04 NVidia X Server Settings only showing PRIME Profiles

I had this problem and was not able to solve it even after a reinstall of Ubuntu 20.04. But the NVIDIA driver was working fine on Ubuntu 18.04 and pop OS 20.04.
I guessed the problem must due to the new feature in Ubuntu 20.04 where during the Ubuntu installer installs the NVIDIA driver during the installation of the OS. So, I reinstalled Ubuntu again on my system after unchecking the option to install third-party software for graphics and WiFi and additional media formats. Then i manually installed the NVIDIA driver post installation of Ubuntu using the GUI as I did for my 18.04 installation. Now all the options in NVIDIA X server settings are displayed. Since I am a newbie to Linux, I was not able to find why this error happened during installation.


LAMP server couldn't be installed using tasksel

Each system-wide installation needs root-rights. Run

sudo tasksel

and make your choice or run

sudo tasksel install lamp-server

to install LAMP.


How come Ubuntu Cloud Live wont run in a VM?

If you haven't enabled I/O APIC, you should do so - else VirtualBox won't be able to run the 64-bit guest on the 32-bit host.

From the manual:

  On any host, you should enable the I/O APIC for virtual machines that you intend to use in 64-bit mode. This is especially true for 64-bit Windows VMs. See the section called “"Advanced" tab”. In addition, for 64-bit Windows guests, you should make sure that the VM uses the Intel networking device, since there is no 64-bit driver support for the AMD PCNet card; see the section called “Virtual networking hardware”.


Ubuntu + Win 7 dual boot -> Common Partition suffers data loss

This isn't necessarily the right answer, but it has useful details that might help others, and seems the best thing that worked a fair bit so far.

As someone on reddit pointed out, one possible reason for this deletion was hibernating on one OS while the other boots, thus using (and likely writing to) the shared drive that the first OS has some image of.

Ever since I've stopped doing this, the problem has recurred far less frequently, and the times it did recur, I may actually have hibernated Windows by mistake (it's muscle memory).

This may actually be the right answer, but I'd need more verification to aver that.


Weird UI/Theme on Ubuntu 20.04 after upgrading from 18.04

You should reset the UI to the default with the following command
dconf reset -f /

As the dconf reset command will reset more than just the Unity, GNOME Shell and MATE desktop you should not run it idly and do make a backup of your existing desktop beforehand, especially if you’ve made extensive customisations and tweaks.
Run dconf dump.


If you want to setup your own server, I'd recommend to install something like "owncloud" which is a web application for uploading and sharing files using the web browser (such as dropbox, iCloud or ubuntu one) (more info http://owncloud.org/)

To install it on your ubuntu computer (that will work as the server)

sudo apt-get install owncloud

You can then access the server using any web browser by entering the url http://YOUR-IP/owncloud , it will ask you for the basic config (such login info) the first time you enter.

Keep in mind that if you'r going to access the server from outside your house (or network) you will have to redirect port 80 from your router to your server.

Also, home internet connections are not designed for servers, thus the upload speed is normally low for a server, so expect no-so-fast file transfers when moving files from the outside to your server and the other way around.

I would also consider getting a free account from a cloud provider (ubuntu one, or dropbox, they both offer 5 gig free) and use that to share files, its simpler, faster, you dont have to worry about setting or mantaining the server yourself.


Why eclipse can not find the hidden .project file until I press Ctrl-H on folder?

This may happen because of a bug in JDK. There is a similar question for Windows on StackOverflow but same may be true for Linux/Ubuntu as well. Try updating your JDK to the latest version and then test opening a project with hidden .project file.


Google Cloud Compute keeps changing my /etc/hosts file after restart

Ghetto option that may not work: sudo chattr +i /etc/hosts

Do man chattr for details, but this makes the file "(i)mmutable", which means even root can't change it (unless root does chattr -i /etc/hosts first, of course).

As above, you can undo this with sudo chattr -i /etc/hosts

Why it happens: I'm guessing you have a process (perhaps dhcpcd or something) that obtains host information from some source, and then updates various files including /etc/hosts (and probably /etc/resolv.conf, which was why I ended up using chattr). The right way to fix things is figure out what process is doing this and configure it do the right thing. You could also do "cp /etc/hosts.correct /etc/hosts" after the process is done mangling your file, but you have to do this late enough in the bootup process that it happens after the process is done mangling.


You need to consider what kind of repository system your team needs to function effectivly. The main difference is between:

Centralised Repositories - CVS, SVN, Simple File Server, etc
Decentralised Repositories - Git, Mercurial, Bzr

I make this distinction now, because if you move from cvs to git, you will need to read up on what it means to have decentralised repositories. The new kinds of work-flows you need to develop will make development easier and more efficient for bigger teams, but the change in workflows will make your first attempts fail as you make assumptions about how it's supposed to work.

Here in the Ubuntu world we use Bazaar (bzr) which is a very good decentralised system written in python and based on mercurial. It's fairly easy to set up a server and the commands and extensions available are well developed. Eclipse has a very good bzr plugin. Launchpad and GNU's Savana use bzr by default and it's my personal first choice.

Git is also another fantastic repository system. Developed by Torvalds himself after his disastrous time with a proprietary system, GIT is lightning fast and only slightly harder to use than bzr. It's used by github, gnome and several other projects as their main repository system after using svn.

Both are available in the Ubuntu repositories, as well as a ton of extensions.

I wouldn't use svn or any other centralised repository unless you have a very small team and know what you're doing.


How to uninstall windows xp using ubuntu 12.04 if they are in same partition?

It sounds like you have used Wubi to install Ubuntu inside your Windows XP machine which is a good way to test Ubuntu but if you want ONLY Ubuntu you will need to re-install on the actual hard-drive and overwrite Windows XP itself...  Wubi uses a file as a virtual hard-disk which only resides inside a WinXP install...


Brightness level starts at maximum on every boot

To find out current brightness

cat /sys/class/backlight/acpi_video0/brightness

To change brightness

echo [brightness value] > /sys/class/backlight/acpi_video0/brightness

To change brightness permanently

sudo -H gedit /etc/rc.local

add the following line above 'exit 0' at the bottom of document

echo [brightness value] > /sys/class/backlight/acpi_video0/brightness

replace [brightness value] with the correct value determined by experiment - more than 0 and less than whatever is in /sys/class/backlight/acpi_video0/max_brightness or the corresponding file.

If echo foo > /sys/class/bar... etc throws a permission error in the shell, try

echo foo | sudo tee /sys/class/bar...

If that doesn't work, you can't change that access point. There's no need for sudo tee in /etc/rc.local though.


upower wants to uninstall lots of packages

Managed to fix this issue. I downloaded the package manually and installed it with dpkg, which shed some light on the problem that neither Update Manager nor Synaptic alluded to...

Downloading from the upower 0.9.9-4 (i386 binary) in ubuntu natty page:

wget http://launchpadlibrarian.net/69387943/upower_0.9.9-4_i386.deb
sudo dpkg --no-force-all --install upower_0.9.9-4_i386.deb

dpkg gave me the following error output which contained the missing link:

(Reading database ... 525265 files and directories currently installed.)
Preparing to replace upower 0.9.5-4 (using upower_0.9.9-4_i386.deb) ...
Unpacking replacement upower ...
dpkg: dependency problems prevent configuration of upower:
 upower depends on libimobiledevice2 (>= 0.9.7); however:
  Package libimobiledevice2 is not installed.
dpkg: error processing upower (--install):
 dependency problems - leaving unconfigured
Processing triggers for man-db ...
Errors were encountered while processing:
 upower

This time, opening Synaptic (which gave me a broken package warning) I installed libimobiledevice2 which fixed upower and now everything seems to be up to date and working.


You will need to enable the i386 arch:

$ sudo dpkg --add-architecture i386
$ sudo apt update && sudo apt upgrade --fix-missing

Now make sure your old repo is disabled by running:

$ sudo software-properties-gtk

and look to see if there is a Steam repo in "other software" tab. If so delete it before proceeding.

You can be sure all requirements are installed using:

$ sudo apt install libgl1-mesa-dri:i386 libgl1-mesa-glx:i386

Then you can try to reinstall steam:

$ sudo add-apt-repository multiverse
$ sudo apt update
$ sudo apt remove --purge steam-launcher steam-installer steam-devices steam && sudo apt autoremove
$ sudo apt install steam steam-devices

Finally, if running steam from command line does not work, try launching it from activities window.

More info available here.


Upgrading to 15.04 might resolve this, as doing a brief check with a LiveUSB running both Ubuntu GNOME and Xubuntu w/ kernel 3.19.* confirms both cards being detected with drivers out of the box.


Completely remove nm-applet from gnome-shell


Which package should I download to compile C++0x code

Find yourself a PPA that suits your needs, and install a GCC package from there. There are install instruction within each PPA's page.

Obviously, PPAs contain unofficial packages, so YMMV.


OpenCL programming on CPU and GPU with Nvidia cards?

Both Nvidia CUDA and ATI Stream OpenCL implementation support the Khronos ICD extension, so when you call clGetPlatformIDs you'll get two different platforms, and therefore you can query for CPU/GPU devices on these platforms and of course the ATI platform will return the CPU device and Nvidia platform will return the GPU device.

Then you can create CommandQueues on these devices and start your kernel. Of course this means that it's not trivial to share the task between GPU and CPU, but at least having a button in your app that switches from CPU to GPU would be quite easy to do.


Windows usually won't typically see an Ubuntu partition as Windows doesn't support as many filesystems as Ubuntu does. This is especially true of the default ext4 filesystem as well as many others. To the best of my extensive knowledge, the only partition types that Windows recognizes on desktop OS's are FAT variants or NTFS. Regardless, it sounds to me like you've somehow lost your boot record or grub configuration. This is in my experience far more likely to happen via a Windows update than any Ubuntu update. (I've seen the former, but never the latter.) To resolve this issue you simply need to repair grub or reinstall grub.


How to fix "-5 No address associated with hostname error" while updating?

This has been a long term problem with apt, and Ubuntu has never fixed it.   Apt doesn't seem to use the same DNS servers that the internal system does - 'ping ' returns a correct IP address.  Apt-get claims that the hostname isn't found.

"Something wicked happened resolving 'extras.ubuntu.com:http" (Which sounds, somewhat, like it's trying to resolve a .com:http domain, which isn't a valid TLD)

To modify /etc/hosts, use the following:

Ping each of the names that are failing to resolve -
        PING extras.ubuntu.com (91.189.88.33) 56(84) bytes of data.

Use your favourite editor, such as vi - 'sudo vi /etc/hosts'.

Scroll down to the end, and add a line such as the following

91.189.88.33 extras.ubuntu.com  (with the appropriate name and IP address. IP is first)

Save the file, then re-run apt-get.  Once you've run apt-get, edit /etc/hosts again, and comment out the line with a hash mark - #.   (or delete it entirely)

#91.189.88.33 extras.ubuntu.com

The reason to comment out/delete the line is that Ubuntu apparently shuffles their servers around randomly, and that might not be the correct IP the next time.


Whats the name of the dropdown panel with the IM status?

In Ubuntu 12.04 LTS and Ubuntu 11.10, this is the Messaging Menu. It contains menu items relating both to instant messaging and to email (and a couple of other, somewhat related tasks).

Before that, there was the Me Menu, which contained instant messaging menu items and also provided access to account settings.

See this article for details. (That article does not cover the changes that are coming in Ubuntu 12.10, though--it's much too old for that.)


My case may not be similar to yours but I post my solution here hoping it helps other people. I ran:

xrandr --verbose

I was not able to change the mode to 1080p using xrandr "--mode 1920x1080 --rate 60" because it has two flavors, 1080p and 1080i, and 1080i is by default stupidly preferred.

DFP5 connected 1920x1080+1920+0 (0xa1) normal (normal left inverted right x axis y axis) 2210mm x 1250mm
    (...)
    CRTC:       1
    (...)
  1920x1080 (0xa1) 74.250MHz +HSync +VSync Interlace +preferred *current
        h: width  1920 start 2008 end 2052 total 2200 skew    0 clock  33.75KHz
        v: height 1080 start 1085 end 1095 total 1125           clock  60.00Hz
  1920x1080 (0xa2) 148.500MHz +HSync +VSync
        h: width  1920 start 2008 end 2052 total 2200 skew    0 clock  67.50KHz
        v: height 1080 start 1084 end 1089 total 1125           clock  60.00Hz

That's why I used --verbose option, it gives this special output where +Interlace (1080i) detail appears and especially the XID code in parenthesis: that's the key to force the mode.

xrandr --output DFP5 --mode 0xa2 --crtc 1 --verbose

As always, using the documentation helped:

man xrandr


Ubuntu is not installing on Virtual box with error of not enough space while I do have the space

You created a virtual drive that is less than 6.6GB.

It does not matter how much space you have "on your C drive", because the virtual machine sees only the virtual drive.

When you create a virtual machine you are asked to specify the amount of space you assign to the virtual disk. But in your case you may run out of disk space.


Boot the windows installation disk,click on Windows recovery option and then select command prompt.Run the following commands in that command prompt,

bootrec.exe /FixMbr
bootrec.exe /FixBoot
bootrec.exe /RebuildBcd

OR

Download boot-repair live disk.Make a bootable boot-repair live usb,change the boot-order in bios to usb.Once the live disk was boot up click on the option Recommende Repair.It will reinstall your grub.


There are two main possible problems:

The user doesn't have Unix access to the /media/ directory.  The easiest way to check this is to just do ls -ld on them and see what the permissions are, or have them log in locally and try it.
They have unix access but Samba is blocking it.  Easiest way to find out if this is the case is to look in the Samba logs for messages saying so, and then change it through whichever means you've set up Samba.  (Editing the config files, a gui, etc.)


Shared folder access in LAN between Ubuntu 9.10 and Windows XP

Personally I just stick smb://windows_address/share_name in Nautilus's address bar (click the pencil or press control+l)

You can also browse the available network through Places -> Network.


Nvidia drivers: Errors were encountered while processing: libglx-mesa0:i386

I am not sure maybe it is because of kernel version. After recent kernel update I had also this kind of problem but downgrading to older kernel versions solved problem


You could do this, but it won't be simple. First you can setup a script that runs when lightdm starts the display. Since it restarts the display when you logout, you'd write a small script that has a 5 minute timer in it that hibernates after a 5 minute delay.  You'd set lightdm.conf to run this script by editing the config file like so:

display-setup-script=hibernate_delay.sh

You could then have a second script that lightdm runs when starting a user session that would cancel the timer.  You set that in lightdm.conf as follows:

session-setup-script=cancel_hibernate.sh

As for the contents of those scripts, they could be simple. hibernate_delay.sh would be something like this, although you'd need to do the parts after the "touch" line in a second script that ran in the background:

#!/bin/sh
touch /tmp/hibernate_timer
sleep 300
if [ -f /tmp/hibernate_timer ];
then
  echo "5 minutes is up, hibernating"
  pmi action hibernate
else
  echo "hibernation cancelled"
fi

The cancel_hibernate.sh script would simply remove the hibernate_timer file so that it doesn't hibernate:

#!/bin/sh
rm -f /tmp/hibernate_timer

Now the theory here in my answer is sound, but I've not tried those scripts and like I mention above, the hibernate_delay.sh script needs to fork off a second script so that the sleep doesn't block. I'm sure there's also a better way to do this (using the command at is worth a look), but the hook-up points to lightdm would be the same.

Good Luck!


Install an RPM Package on Ubuntu Linux

Installing software on Ubuntu usually entails using Synaptic or by using an apt-get command from the terminal. Unfortunately, there are still a number of packages out there that are only distributed in RPM format.

There’s a utility called Alien that converts packages from one format to the other. This doesn’t always mean that an rpm will work on your system, though. You will need to install some prerequisite software packages in order to install alien, however. These packages include gcc and make.

http://www.howtogeek.com/howto/ubuntu/install-an-rpm-package-on-ubuntu-linux/


Are dconf values for 'top-panel' and 'bottom-panel' used by Gnome Shell?

The answer is: no, they aren't used by Gnome Shell.

The reason is simple: those settings are for gnome-panel and gnome-panel is not part of Gnome Shell, it is part of the so-called Gnome Fallback (or Gnome Classic).

If you want a proof to be 100% sure, download the source code of both gnome-panel and gnome-shell:

apt-get source gnome-panel gnome-shell

and then look for a property:

grep -r unhide-delay

You'll see that all results come from the gnome-panel package.


Ubuntu slow when laptop connected to power

Could have something to do with C-States or P-states which refer to power modes that a CPU can use in order to efficiently use power/frequency without loosing performance. Here’s a post that explains the details.

I had a laptop that used to freeze because of a non-supported c-state and had to set intel_idle.max_cstate=1 to my GRUB configuration as a boot parameter
GRUB_CMDLINE_LINUX_DEFAULT in
/etc/default/grub

A useful place to know more about your cpu frequency managment is:

cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver

mine is: acpi-cpufreq

cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors

mine are: conservative ondemand userspace powersave performance

Would be curious to know how it goes


You may want to use sddm instead of light-dm. If you don't know how to do this:

    sudo apt-get install sddm
    sudo dpkg-reconfigure sddm && sudo reboot now

Then select sddm and hit Enter (or return) Now this keyring issue may also be a cause. Would you please leave a comment with name of the ring and maker?


First:

execute the following command:

sudo apt-get purge postgres

review the changes to be made and if you are happy accept the changes and continue.

Next:

remove the repository from /etc/apt/sources.list.d like so:

sudo rm /etc/apt/sources.list.d/pgdg.list

Finally:

sudo apt-get update
sudo apt-get autoclean
sudo apt-get autoremove

done.


Start wicd before waiting for network configuration

So I've found two approaches to solving this, both outlined on this Debian page:

Continue to use wicd but effectively disable /etc/network/interfaces by leaving only the loopback entries.
Configure wlan0 directly in /etc/network/interfaces and wicd can be removed (as also suggested by steeldriver above).

Edit: I've now tried both, and both worked, but using method 2 was not as hard as I thought! As suggested by the Debian documentation, all I needed was to make sure wpasupplicant was installed (it already was), change the two existing lines in /etc/network/interfaces for the primary network interface to wlan0, and then add two lines, like so:

auto wlan0
iface wlan0 inet dhcp
    wpa-ssid  MyNetworkSSID
    wpa-psk   MySecretPassphrase

I didn't have to enter every single attribute about the network, and I didn't even have to translate the WPA-PSK passphrase to hexidecimal (though I chose to using the wpa_passphrase tool). So with that, I can be more sure that the network will be active at startup, and I can abandon wicd as one more daemon taking up resources.


Yes, Ubuntu does support a desktop extended across multiple monitors by default. Just today I brought in my Thinkpad with Ubuntu 13.04 (Unity) to work to try out with 2 external monitors and both were properly detected immediately. In the "Displays" settings you can configure them to your liking, as shown here:

You can get to Displays by simply searching for it in the dash, or by going to System Settings > Displays. Your mileage may vary based on your graphics chipset. For example, an Nvidia chipset may have its settings in a utility provided by Nvidia instead of being fully configurable from this interface. In my example, the chipset is an Intel HD4000. Also be aware of how the performance capabilities of your graphics card will affect overall graphical performance across an increasing number of monitors with high resolutions.


How do i theme new Header-bar for gtk3 compnents?

The GNOME Headerbars are themed using the GTK+ Theme and Icon Set that you have applied on the desktop environment you're using, so to change the theme and icons on GTK+ Headerbars, you'll need to use a Tweak Tool e.g: unity-tweak-tool to be able to change the theme. Once there, select a GTK Theme of your choice and the headerbars' look will change in rhythm and the same goes for a change of the icon set.

Or in simple terms: They should be thought of as GTK+ toolbars (With Window Buttons (if compatible))...


Can I merge free space partition with my Ubuntu (Linux) filesystem?

Yes, you can, but run Windows after that so its' CHKDSK can check for any problems or issues. Also, make sure not everything of the 900GB is filled(the number of GBs that's filled on Windows must be less than the number you want to add to Ubuntu). If you need space on Windows sometime after and need to cut from Ubuntu, use a Live CD/DVD to do so.

EDIT: If you need software to do so, I believe GParted will serve you.

sudo apt-get install gparted


Ubuntu GNOME live not loading properly on MacBook Pro

I learned about the gpt kernel option from the guide below.  There is an open source, but paid for binaries system available called Mac Linux USB Loader at https://www.sevenbits.io/mlul/ .  It can help you generate the live USB stick, and gives you some easy kernel modifications on boot.  I'm sure you can do this directly off the default installer too, but I'm not sure exactly how.

It works for the live boot from a USB stick for me (both for Ubuntu GNOME and regular Ubuntu).  For some reason, I haven't been able to get the install that I do using Ubuntu GNOME to work, but the install from regular Ubuntu DOES work.  I've been experimenting with getting GNOME to install after getting the initial system up and running, but so far I keep getting a black screen after rebooting once I've installed ubuntu-gnome-desktop.

The guide I mentioned lead me to the Mac Linux USB Loader is here: https://medium.com/@racter/how-to-install-ubuntu-16-04-on-a-retina-macbook-11-2-74e7779c0e47 .


The easiest way I can think of doing this is to cause the action of moving the mouse to the top to show/hide the desktop. Assuming you're using unity, you can do this:

Open Ubuntu Software Center. Search for "CompizConfig Settings Manager". Install it.
Open CompizConfig Settings Manager and click "General Options".
Go to the tab at the top labeled "Key Bindings".
Scroll down until you see a screen with the words "Show Desktop" next to it. It should have a button that says "None" across from it.
Click that button. A window with a screen in it will pop up. Click the red bar running across that screen. Click OK.
If it gives you a pop-up about any other plugin using the top of the screen, click "Set Show Desktop Anyway".

You should now be able to show/hide the desktop by moving the mouse to the top of the screen.

Hope this solves your problem!


Audio cuts out and in after upgrade to 20.04

I do not understand why but I installed "PulseAudio Volume Control" and as long as it is running the problem is gone.  If I close it it comes back.


I deleted all traces of my OS and need/want to start over with an ubuntu installation

It's not a Linux question - or even Ubuntu, but...

You have the Ubuntu CD in the CD drive, right? If you do, then apparently your computer boots from the hard drive first. You can change that.

With computer's make/model in mind, find the manual online in order to learn how to get into the computer's BIOS and how to select a different boot device at boot time. Then you can either change the boot order in the BIOS or choose it at boot time.

If you want to hack though it instead, insert the Ubuntu CD in the CD drive.
As the system first boots, you may see a "Boot Options" menu. Choose it.
Then ask the computer to boot from CD.

Failing that, you can try to glean how to open your BIOS the same way.
As the computer first starts, look for "Setup" or "BIOS" or "System" or any kind of clue to learn the BIOS function key. Or maybe try the function keys as it is booting:
F1, F2, F10, F12, DEL, or some other function key perhaps.
Once you are in the BIOS, navigate to the "boot order" section.
Place the CD/DVD at the top - or the first boot device.


Huawei Matebook 13 - headphones always listed as disconnected

Try:

"sudo echo "options snd_hda_intel model=dell-headset-multi" >> /etc/modprobe.d/sound.conf"

Reboot after.


Does Wily have inherently better WiFi performance than Trusty?

The OS will not influence radio signal strength. But the firmware of the WiFi HW and its setup may do. With every Ubuntu you get firmware files (located in /lib/firmware). Depending on your WiFi HW one of these files may be loaded at startup. If you experience such an obvious difference, you should check the difference of the firmware file in question.

It may also depend on some configuration settings, especially the country setting is influencing the transmission power. Have a look at

iwconfig

and the Tx-Power value. Some WiFi HW has two or more antennas which can be configurated. But for these deeper details the type of HW needs to be known.

Last point is self made interference. For example the beaglebone black is known to interfere WiFi with its own HDMI output. So this shall be disabled for better WiFi results. Every PC may have components interfering its own WiFi. So WiFi performance depends on the operation state of these.

But NO Wily does not overall have a better WiFi performance than Trusty.


Problem installing Google Earth .deb file

The error you receive is about the package not being found, or not being readable.
It should not be about a corrupted package.

As it has been already asked to you, please report output of:

ls -l /home/andy/googleearth_6.0.3.2197+0.6.0-1_i386.deb

You can also try the following command:

dpkg --info /home/andy/googleearth_6.0.3.2197+0.6.0-1_i386.deb

This should return some basic information about the package, and so it would do a couple of checks useful in your situation:

the file exists and it's readable
the file is a real .deb package and it is not corrupted


Ubuntu 18.10 stuck on "Started bpfilter" while booting

Actually, scratch that. Do this: edit /etc/gdm3/custom.conf and uncomment the line:

#WaylandEnable=false

The issue also doesn't seem to appear in a fresh install of Ubuntu 18.10.

Go here and press the affects me button to raise awareness. Feel free to provide information/logs needed by the developers in the comments. Thank you.

Removing the nvidia proprietary drivers seems to fix the issue. Go into recovery mode by pressing Shift during boot and run sudo apt-get remove --purge nvidia-* Say goodbye to gaming, though. I have filled a bug in Launchpad. You might want to press the "affects me" button. Thank you.


I have returned the CPU to the vendor and I don't get any crashes with the replacement.
So if anyone has the same issue, you could try to make it work by increasing the SOC voltage, but RMA is the way to go in my opinion.


Ubuntu black screen after update drivers

I'm not exactly an expert but in Ubuntu 16.04 when I had driver problems I was able to type:
Cntrl-Alt and f1  or f2  (or similar... try the other 'f's on your keyboard) and get a terminal or command prompt.   Then, at the prompt, the older version had a command "sudo systemctl start lightdm.service" that allowed the GUI/graphical interface to work.  Perhaps systemctl and lightdm are still used in Ubuntu 18?

I hope that helps or leads to a solution.  Good luck.


chntpw hex on windows 10 registry entry crashes to get bt session key

OP might already have his answer but for people (like me) who stumbled over the same error because they didn't pay attention.
yyyyyyyyyyy is not a value but a subkey.
So, you have to cd into yyyyyyyyyyy where you'll find a couple of values.
In my case this was a folder because it was a Bluetooth LE device. Not sure if this is only the case for Low Energy devices, though.


How to configure Postfix to use Gmail SMTP on Ubuntu 16.04 / 17.10

1.configure Postfix

Edit the Postfix configuration file.

sudo nano /etc/postfix/main.cf

Find the following line relayhost = about 6 lines up from the bottom of the file and delete it.

Add the following to the end of the file.

relayhost = [smtp.gmail.com]:587
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_tls_CAfile = /etc/postfix/cacert.pem
smtp_use_tls = yes

Save file and exit. (Press CTRL + X, press Y and then press ENTER)

2. Create Password and DB Files

Create the sasl_passwd file which will store our credentials.

sudo nano /etc/postfix/sasl_passwd

Insert the following:

[smtp.gmail.com]:587 username@gmail.com:password

Save file and exit. (Press CTRL + X, press Y and then press ENTER)

Create a hash database file for Postfix with the postmap command.

sudo postmap /etc/postfix/sasl_passwd

There should now be a file called sasl_passwd.db in the /etc/postfix/ directory.

For added security, we will only allow root user to read and write to sasl_passwd and sasl_passwd.db

sudo chown root:root /etc/postfix/sasl_passwd /etc/postfix/sasl_passwd.db
sudo chmod 0600 /etc/postfix/sasl_passwd /etc/postfix/sasl_passwd.db

3.Send a Test Mail

We’ll now send a test email message. Make sure to replace test@example.com with your own email address.

echo "Test Email message body" | mail -s "Email test subject" test@example.com


How to make sed or by using another command to reprint a found string?

You are close. The sed command you want is
sed 's/test/\ntest/g'

It prepends a newline character to each test.
Now, although GNU sed and possibly others do it, the interpretation of \n as a newline is not specified by POSIX.
To make the command portable, a literal, escaped newline is required,
sed 's/test/\
test/g'

You will notice, however, that if test is the very first four characters
of the line, as is the case with your example, that will create an empty
line at the beginning of the output. If that is not to happen, we can use
sed 's/\(.\)test/\1\ntest/g'

. matches any character, so the existence of some character before test is required, otherwise the regex does not match. I.e., if test is the first string in the line, then . can't match anything and the substitution is not made.
And for the portable alternative,
sed 's/\(.\)test/\1\
test/g'

Some tests with GNU sed:
$ sed 's/test/\ntest/g' <<< 'testfsdfsdftestfsdkflsdtestsdfsdfsdf'

testfsdfsdf
testfsdkflsd
testsdfsdfsdf
$ sed 's/\(.\)test/\1\ntest/g' <<< 'testfsdfsdftestfsdkflsdtestsdfsdfsdf'
testfsdfsdf
testfsdkflsd
testsdfsdfsdf

I also tried sed 's/\(test.*\)test/\1\ntest/g', which works if there are only two instances of test, but not three or more.

That's because .* is greedy, i.e., it will match all it can. For example,
grep --color=always "b.*b" <<< abcabcabc

colors/matches everything from the first to the last b.


Logging out leaves the display in a garbled state, unable to restart X, or switch to text console

You may try this fix: https://bugs.launchpad.net/ubuntu/+source/lightdm/+bug/1066410/comments/44

I had the problem where sometimes my laptop wouldn't load to the login screen, or wouldn't recover from the screensaver. It was basically a race condition, so it was hard to reproduce.

This may not fix it, but it's worth a shot.


You need to install a boot manager, like Grub or something similiar.

Insert your Ubuntu CD, reboot your computer and set it to boot from CD in the BIOS and boot into a live session.

You can also use a LiveUSB if you have created one in the past.

Install and run Boot-Repair

After this, click "Recommended repair" and apply.

If you are willing to use the advanced options, make sure you leave the "Reinstall GRUB" checkbox ticked.

Now reboot your system.

The usual GRUB boot menu should appear. If it does not, hold Left Shift while booting. You will be able to choose between Ubuntu and Windows.

Source


Mount 2 disks where one disk is the base and the disk contains the data changes from disk one

I think you're describing a basic overlay filesystem, like the live ISO's use. How about just:

use a live ISO/USB with all changes in ram, and reboot to "reset" it

Or use persistence to save changes over reboots, and erase the persistent files to "reset"

You could always use an overlay filesystem directly yourself, but the ISO's are already nicely set up & ready to roll. Here's some overlay info/help links:

Overlay Filesystem on kernel.org

Overlay filesystem on wiki.archlinux

Overlayfs allows one, usually read-write, directory tree to be overlaid onto another, read-only directory tree. All modifications go to the upper, writable layer. This type of mechanism is most often used for live CDs but there's a wide variety of other uses.


What are my graphics option on a AMD hybrid graphics MacBook Pro (8,2)?

You dont need to build any custom kernel for your Macbook 8,2 nowdays.

following these two should suffice for you to get hybrid graphics running properly.

Install Macbook 8,2 in efi mode

To switch between graphics cards


Problems with python-gtk2-dev after update to Ubuntu 15.04

The solution was to manually uninstall the package as described here:

To manually uninstall the broken package run the two commands below as root in Debian, preceded by sudo in Ubuntu :

mv /var/lib/dpkg/info/PACKAGE.* /tmp/
dpkg --remove --force-remove-reinstreq PACKAGE

where PACKAGE is the broken package


Computer Won't Boot after Updating the BIOS on a Dell Precision 5820

Here's how I solved the issue:

Unplug all peripherals including the keyboard, mouse, and monitor.
Clear the BIOS, CMOS and NVRAM by removing the CMOS battery
a)  Power off the computer, then unplug it
b)  Press and hold down the power button for 30 seconds
c)  Open case and remove the motherboard (nickel sized) battery
d)  Press and hold down the power button for 30 seconds
e)  Reinstall the battery
f)  Close up the case and connect only the keyboard, mouse, and (one) monitor
g)  Reboot
At this point, my computer would only boot to BusyBox. BusyBox gave me a "ALERT! UUID=*** does not exist. Dropping to a shell" error.  My OS is installed on a NVMe PCIe SSD boot drive, and I have a single SATA file drive.
Reboot and enter the boot menu (hit F12 repeatedly when you see the splash screen).  Go to "BIOS Setup."
a)  Under "System Configuration," set the "SATA Operation" from "RAID On" to "AHCI."
b)  Under "Intel VMD Technology," set to "Disabled" and uncheck the listed hard drives (PCIE0, PCIE1....).
Reboot.

This fixed the problem for me.  The Intel VMD Technology has something to do with setting up RAID.  When it was enabled, the BIOS couldn't see my PCIe boot drive.
If you're setting up a new system, you may have to tinker with the "Boot Sequence" under the "General" BIOS settings.


Why the login-shell is bash, but the /bin/sh is the link of dash?

General comment about sh

The shell sh is a symbolic link to dash, which is a shell with a very light foot-print. It means that it can work quickly and will not use much memory. But the built-in commands are few, simple and have different syntax compared to more advanced shells (for example bash).

Both shells (sh and bash) are useful but for different purposes.

How to make a shellscript run by bash

If you run a text file with commands, a shellscript, you can force it to run by a certain shell. Otherwise it may default to a shell, that does does not work as intended, for example because some built-in command does not exist or the syntax for a built-in command is different.

So in order to make a shellscript run with bash, you can force it

by calling it from bash

bash shellscriptname

by writing a line at the top of the file, a first line with the content

#!/bin/bash

This is called 'shebang'. The shebang can point to other shells too, for example sh or csh but also other programs, for example python or bc. If you make the shellscript file executable

chmod +x shellscriptname

you can run it with the following command

./shellscriptname                        # when in the current directory
path-to-the-script-file/shellscriptname  # when somewhere else
shellscriptname                          # when in a directory in PATH

and it will be executed by the shell or other program in the shebang.


Why is ProjectM not opening in Ubuntu 17.04?

Just install ttf-dejavu:

sudo apt-get install ttf-dejavu


I got steam working after installing the newest AMDGPU drivers https://support.amd.com/en-us/kb-articles/Pages/AMDGPU-PRO-Install.aspx


At https://manpages.ubuntu.com/manpages/latest/man5/smb.conf.5.html go towards the end of EXPLANATION OF EACH PARAMETER:

   writable

       This parameter is a synonym for writeable.

   writeable (S)

       Inverted synonym for read only.

       Default: writeable = no


A quick solution.

Open a terminal (Ctrl+Alt+T) and run the following commands:

For 64-bit Ubuntu:

sudo ln -s /lib64/x86_64-linux-gnu/libc.so.6 /lib64/libc.so.6

For 32-bit Ubuntu:

sudo ln -s /lib/i386-linux-gnu/libc.so.6 /lib/libc.so.6


Assuming you need a CLI method:

Use your favourite editor to edit /etc/network/interfaces with root permissions.

sudo nano /etc/network/interfaces

(lines starting with # are just comments, they are not effective, you can leave them as they are, you also keep the lines with lo as they are)

# The loopback network interface
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 192.168.0.100           # use the address you really want
netmask 255.255.255.0
gateway 192.168.0.254           # use the address of your router

You will have to restart the interface sudo ifdown eth0 (may throw an error, ignore that), then sudo ifup etho - you can check if the settings are effective with ip ad.

For a detailed outline see

Ubuntu Server Guide - chapter networking


Connecting to MySQL in Bash (without MySQL installed)

To install the command line MySQL client you should do:

sudo apt-get install mysql-client

and then you can do

mysql -h HOST -P PORT_NUMBER -u USERNAME -p

However you may need to alter the set up of the MySQL server. By default on ubuntu the MySQL server will only accept connections from the local server. The setting is called bind-address and is set in /etc/mysql/my.cnf. By default it is 127.0.0.1 - you should change it to the IP address of the server. If the server has multiple IP addresses you can choose just one IP address (say for the internal network) or have MySQL listen to all IP addresses by making the value 0.0.0.0

You will also need to ensure that the MySQL user can access the database. Following instructions on the internet, you may have created user 'myname'@'localhost' - that user will not be able to connect remotely. To create a new user who can connect from your client IP address you need to do something like:

GRANT ALL PRIVILEGES ON database_name TO 'username'@'192.168.0.51' IDENTIFIED BY 'password';

Read a little more about the address specification MySQL uses.

Finally don't forget to ensure that the server firewall will allow access to the MySQL port - the default is 3306.


How to create Win95 Fat32 LBA partition Type on 32 GB USB

Try these steps:

Open a terminal and run this command to locate the right device:

lsblk

Use fdisk command accordingly:

sudo fdisk /dev/sdX; X stands for the right disk letter something in the region of b, c or d
Type o to change the partition table type to dos
When the command runs type d and enter to delete the existing partition, then
Type n to create new partition
Accept the defaults when ask for the partition type and size (assuming that is desirable),
Type p to see what you have done,
Type t to change the file system type,
Type c to create a W95 FAT32 (LBA) partition,
Repeat step 2.5, i.e. 5 above to see the created partition,
Type a to activate that partition so it automounts,
Type w to write the changes to disk

Format the again from the terminal:

sudo mkfs.vfat /dev/sdXi

Note: i represents the partition number in this case it should be 1

Eject and replug the device

NOTE: This will destroy any data on the said device e please back up anything you wish to keep before following theses steps.


How to create wifi hotspot on Ubuntu 14.04 that is visible to every device?

As @Zeiss Ikon said, it seems that it doesn't support AP mode. Sadly this happens to me too.

You can run in a terminal iw list and check the Supported interface modes: section to see if there is any reference to AP. If not, then you can't use the AP mode.


It's the NVidia graphics drivers, I've had this happen to me.  When the computer boots like that, you might be able to use CTRL+ALT+F1 to get to a terminal.  You can alternatively boot into "Rescue mode" so it throws you into a root terminal.

After you're logged in, there is information here that may help you with installing the proprietary NVidia drivers for your particular card.

https://help.ubuntu.com/community/BinaryDriverHowto/Nvidia

Edit: I just thought I would mention that if you are concerned with having to reformat to upgrade, Ubuntu and most Ubuntu/Debian based distributions support upgrading in place without reformatting.  The Ubuntu LTS releases or Debian stable are good choices for not having to format because they receive support for long periods of time.


That's happening because you are trying to create a file system on a volume which has 512B block size.

First create a partition with 4K block size and then try to create file system on it.

OR simply use this command.

$ sudo mkfs.ext4 -T largefile4 /dev/sdb1 -b 4096


Instead of whitelisting, well, there's another way to run RKHunter: use DPKG's hashes to verify file integrity:

sudo rkhunter -c --skip-keypress --pkgmgr dpkg


Changing ownership of folder not working!

Why Lower-Case $user Doesn't Work

To clarify and expand upon what others have said, shell and environment variables are case-sensitive. user and USER are different variables, so their contents (which $user and $USER expand to, respectively) may be different. Typically, no variable called user is defined and $user is expanded to nothing, while what you want is $USER which would expand to your username.

The echo command is usually suitable for checking the value of a variable:

$ echo "$user"

$ echo "$USER"
ek

For variables whose values don't contain any blank spaces, the quotes may be removed without affecting the output.
So I could've just used echo $USER if I wanted.

Another Option, for chown

You probably know your own username, so you can just use it in place of $USER. If you do this, make sure to omit the $ sign.

For example, since my username is ek, I could use:

sudo chown ek -R /usr/bin/.folder/

Why You Get That Error

You might be wondering why you get the particular error message:

chown: missing operand after '/usr/bin/.folder/'

That message actually is informative, in that when you see a message like that from a command where you expanded variables, it suggests one or more of your expanded variables may have been unintentionally empty or unset.

You ran sudo chown $user -R /usr/bin/.folder/, and since user was probably undefined, $user expanded to nothing and it was equivalent to running:

sudo chown -R /usr/bin/.folder/

The -R option makes chown act on every file in a directory tree, as you probably know. Since $user expanded to nothing, /usr/bin/.folder/ was the first non-option argument to chown, and thus was interpreted as the argument specifying the desired ownership (such as a username). /usr/bin/.folder is not valid syntax for that, but that particular error went unreported because a different error stopped chown first: there were no more arguments, and so there was nothing specified for chown to operate on.

To put it another way, if I ran sudo chown $USER -R /usr/bin/.folder/, it would expand to sudo chown ek -R /usr/bin/.folder/ and chown would interpret its arguments this way:

ek: username, since no username argument has been passed yet
-R: recursive option (the leading - is what makes chown know it's an option argument)
/usr/bin/.folder/: file or directory to change ownership on, since the username was already passed

But if I ran sudo chown $user -R /usr/bin/.folder, it would expand to sudo chown -R /usr/bin/.folder/ and chown would interpret its arguments this way:

-R: recursive option
/usr/bin/.folder/: username, since no username argument has been passed yet

Further Reading

For more information, you may be interested in:

BashGuide/CommandsAndArguments
BashGuide/Parameters
man chown


Ubuntu14.04LTS + VMware Workstation11 missing Linux-Header

Try to look somewhere here (openvz download site):
http://download.openvz.org/kernel/branches

In particular, mb you need this one: http://download.openvz.org/kernel/branches/rhel6-2.6.32/042stab092.3/

In any case you have to find headers from the same source you took the kernel itself.


Fibocom L850-GL installation on Ubuntu 18.04

Fibocom L850-GL now works on Linux on ThinkPad laptops, see https://github.com/abrasive/xmm7360

The related solution post on lenovo forum: https://forums.lenovo.com/t5/Other-Linux-Discussions/WWAN-Fibocom-L850-GL-and-Linux-support/m-p/4561524#M13843


Launch terminal with initial position as split right?

WorkAround

Install the package xdotool if not yet installed with the command sudo apt install xdotool

Write a script with below content in your $HOME/bin/ with the name something called GT.sh

#!/bin/bash

gnome-terminal && xdotool sleep 0.1 key super+Right

Create a desktop entry with the name something called GT.desktop in /usr/share/applications/ with below content

[Desktop Entry]
Type=Application
Name=GT
Exec=/bin/bash /home/<user>/bin/GT.sh

This way when you open All apps.. you have to select GT icon instead of Terminal icon

Disable the Default Shortcut for "Launch Terminal" and then Create a Custom shortcut with Ctrl+Alt+T for the command /bin/bash home/<user>/bin/GT.sh

Observed that the shortcut Ctrl+Alt+T Opens new terminal windows as expected. But clicking on the desktop entry icon "GT" is not opening as expected if a terminal is already opened..


It normally defaults to auto-mount, auto-play, etc.  But you can change that.  For my system (Oneiric Gnome), in the "System Settings", "Removable Media", there are settings to "Select how media should be handled".  There is a button for "Other Media...", and includes blank disks, etc.  You can have it ask, do nothing, or run a program.

But I believe it normally will automount, although there is an option for whether it's visible on the desktop.  It should be available in the file manager, in the /media folder, though.


How to customize window and panel shadow in KDE

System Settings/Application Style/Window Decorations will display your currently-selected theme. On each theme display there is a button (on mine it is a spanner but I've got a feeling that is itself theme-dependent). Click on the button and you get a window with tabs, one of which is labelled Shadows, from which you can change the thickness and color, although that might be theme-dependent too (I have Breeze selected at that point but my setup uses a bit of a mish-mash of things from various themes.)


What does "Page fault failed for pfn[0] = 0x0" in kern.log means?

The piece of code comes from the AMDGPU drivers:

for (i = 0; i < ttm->num_pages; i++) {
    /* FIXME: The pages cannot be touched outside the notifier_lock */
    pages[i] = hmm_device_entry_to_page(range, range->pfns[i]);
    if (unlikely(!pages[i])) {
        pr_err("Page fault failed for pfn[%lu] = 0x%llx\n",
               i, range->pfns[i]);
        r = -ENOMEM;

        goto out_free_pfns;

Apparently, unlikely() function returned true evaluating the negation of the content of the i entry in the pages array, which contains of the result of the hmm_device_entry_to_page()  for "the range use to decode device entry value" and "device entry value to get corresponding struct page from". This supposedly trows an out of memory (ENOMEM) error for the gpu. Basically, there was a memory error in your gpu and it's complaining that it's out of memory.


I'd rather recomment you to have different permissions for directories and files, because you'll need to run some commands inside of directory (like ls, cp, cat etc.), and they require "executable" permission.

At the same time I strongly recommend you to add "executable" bit only to that files, that should be executable - some scripts, commands, etc.

You may use the following scheme to set permissions on files&directories separately:

sudo find . -type d -exec chmod 775 {} \;

for directories

sudo find . -type f -exec chmod 664 {} \;

for files,

Instead of ‘.’ you may use the full path to needed file or directory. 775 & 664 - are binary-written permissions. More information about them you may receive there - http://linuxcommand.org/lts0070.php

If you'd like to provide full permissions on files and directories, you may perform the following:

sudo find /opt/lampp/htdocs -type d -exec chmod 777 {} \;

for directories

sudo find /opt/lampp/htdocs -type f -exec chmod 666 {} \;

for files.

Also take care about owner:group_owner parameters, they're also important for you.


Why does hitting Control + C when in an application launched from a script, break the script?

When you send a signal like SIGINT (CtrlC) or SIGSTOP (CtrlZ) from a terminal, the signal is sent to the foreground process group. That is, the group comprising of the foreground job (your script), and any child processes it has in the foreground (the tail command). This causes all these processes to exit (or do whatever it is they do by handling the signal). You can test the difference by sending a signal using the kill command:

In one terminal, execute this script (I'm calling it test in the following commands):

#! /bin/bash

while true
do
    if [[ $1 = a ]]
    then
        yes
    else
        echo no
        sleep 2
    fi
done

In another, execute these commands:

pstree -ps $(pgrep -f test)
pkill -f test
pstree -ps $(pgrep -f yes)

The output of the commands would be something like this:

init(1)───lightdm(1032)───lightdm(1154)───init(1173)───x-terminal-emul(17009)───bash(24262)───test.sh(24996)───yes(24997)
# No output for pkill
init(1)───lightdm(1032)───lightdm(1154)───init(1173)───yes(24997)

(The actual numbers and programs may vary, but the first init will always have pid 1.)
As you can see, the yes command wasn't killed, and got attached to init because its parent was killed. It's still merrily printing ys on the first terminal. So kill it with pkill -f yes. Now repeat the experiment, with one change. Instead of pkill -f test, do:

kill -INT -25165
# Use the pid of test.sh given in parentheses in the output of pstree
# instead of 25165

Note the leading -. In Linux, for the kill command, -25165 is the process group, whose leader has pid 25165. Thus, this command is the equivalent of sending an interrupt from the terminal.

Of course, the exact behaviour depends on the configuration of the TTY, the login shell and so on. This is as far as my understanding goes. Further reading:

Sending and Trapping Signals
Preventing propagation of SIGINT to Parent Process
The TTY demystified

I suggest:

Sending the tail to the background
Trap the signal
Kill the background process.
Remove the trap

An example:

#! /bin/bash

kill_jobs ()
{
    kill %1
}

while true
do
    if [[ $1 = "a" ]]
    then
        trap kill_jobs INT
        tail -f /var/log/syslog &
        wait %%
        shift #You don't need to shift, I just didn't want loop tail on this example
        trap - INT
    else
        echo some output
        sleep 2
    fi
done

This can become very powerful, by using different functions for trapping, and each doing their own clean up work.


How do I change the font color in ubuntu software center

Ubuntu is based on Gnome and AFAIK, Gnome has got some tools to do such a thing (don't use those tools for a while, since 9.04 Jaunty Jackalope or something like that). They might be in Gnome customization menus. So install Gnome 3 (Gnome Shell and/or Gnome Classic) and have a look at their customization menus. Try also with MATE (Gnome 2 fork) packages.

PS : if somebody knows the real names of the packages of I am dealing with (Gnome custonization programs), feel free to edit the answer.


How to install Elasticsearch on 16.04 LTs

Elastic has their own guide to install elasticsearch with Debian packages. you can find it on their website.

https://www.elastic.co/guide/en/elasticsearch/reference/current/deb.html

I used this one and now everything works like a charm.

Elasticsearch requires Java 8 or later:

$ sudo apt-get install openjdk-8-jdk
$ java -version
openjdk version "1.8.0_111"

Install Elasticsearch

$ wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
$ sudo apt-get install apt-transport-https
$ echo "deb https://artifacts.elastic.co/packages/5.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-5.x.list
$ sudo apt-get update && sudo apt-get install elasticsearch

some remarks (from elastic website):

Do not use add-apt-repository as it will add a deb-src entry as well, but we do not provide a source package. If you have added the deb-src entry, you will see an error like the following:

Unable to find expected entry 'main/source/Sources' in Release file
Wrong sources.list entry or malformed file)

=> Delete the deb-src entry from the /etc/apt/sources.list file and the installation should work as expected.

If two entries exist for the same Elasticsearch repository, you will see an error like this during apt-get update:

  Duplicate sources.list entry
  https://artifacts.elastic.co/packages/5.x/apt/ ...`

=> Examine /etc/apt/sources.list.d/elasticsearch-5.x.list for the duplicate entry or locate the duplicate entry amongst the files in /etc/apt/sources.list.d/ and the /etc/apt/sources.list file


Is it possible to autopause Clementine on Skype call?

Open Skype
Go to Options → Notifications
Select a notification to modify, like Incoming Call Ringing
Under Execute the following script, put in the command

Source


How to recover files after changing partition filesystem?

If indeed the filesystem was damaged or destroyed you do not hold the best cards, since the filesystem is as you surely know the link to the files in the partitions.

Still of course there might be some change to recover the files by using tools which work upon the concept that most files are recocnized by the sequence of their very first bytes. This means that even when the filesystems is missing some files can be found by searching the content for the patterns of files. This all relies on the finding of so called  magic bytes

A programme to do such a search could be the Ubuntu package magicrescue

Normaly you should have backup... so all the problem should not exists... since you would revocer your files from  the backup. Just in case you do not have backup... Do not write anymore on the partition you expect to still contain some of your data. You might by this overwrite data valueable to you.

A good procedure would be to use dd to backup the partitions content first.

Some other tools you might wanna tryout are

testdisk http://www.cgsecurity.org/wiki/TestDisk (which has some ability to repair less sophisticated Filesystems like vfat/Fat32 etc) and also to search for files on lost paritions
System Rescue CD (A ios image of a live-linux which comes with some tools for data recovery for instance testdisk) http://www.sysresccd.org/SystemRescueCd_Homepage

good luck.
PS have some more search in the Askubuntu.com. It might very well be that you have not yet found some information upon data rescue already available on the side already.

good luck

You mentioned that you :

  [...] assume that the filesystem of the partition was changed from NFTS to ext4,[...]

with sudo fdisk /dev/sda -l you can find out what your partition layout looks like.


Problem solved, turns out I had a youtube Chrome app installed that I was using a couple years ago. After uninstalling it everything is ok.


How do you know what (UINT32 id) is or is not?

Given the statement You ... need a way to get that ID ... in this answer and the following empirical observations perhaps the title of the question should be changed to "How can gdbus ... -m org.freedesktop.Notifications.CloseNotification ... close a notification?"

Is it by implication or process of elimination that the statement "... it only states that the ID is to be unique, non-zero, and less than MAXINT ...", found in the description of 9.1.2. org.freedesktop.Notifications.Notify, also applies to the CloseNotification parameter (UINT32 id)? The UINT32 by process of elimination is the only common factor as an attribute type in the documentation and there is the  implication that there must be some sort of common ID "handle" but ...

The details of the returned value of Notify and its parameter UINT32 replaces_id are quite explicit but it is not clear that CloseNotification's (UINT32 id) has anything to do with that as demonstrated with empirical testing below.

Quoting 9.1.3. org.freedesktop.Notifications.CloseNotification in toto:

9.1.3. org.freedesktop.Notifications.CloseNotification

void org.freedesktop.Notifications.CloseNotification (UINT32 id);

Causes a notification to be forcefully closed and removed from the user's view.
It can be used, for example, in the event that what the notification pertains to
is no longer relevant, or to cancel a notification with no expiration time.

The NotificationClosed signal is emitted by this method.

If the notification no longer exists, an empty D-BUS Error message is sent back.

This does not characterize or explain the meaning of (UINT32 id).

A glaring omission is the lack of a table to describe the NotificationClosed (UINT32 id) parameter.  All the other parameters for methods and signals are qualified with such tables.

Empirical tests show notifications do not close using Notify's return value:

 qdbus  org.freedesktop.Notifications                           \
       /org/freedesktop/Notifications                           \
        org.freedesktop.Notifications.CloseNotification         \
$(gdbus call --session                                          \
     -d org.freedesktop.Notifications                           \
    -o /org/freedesktop/Notifications                           \
     -m org.freedesktop.Notifications.Notify                    \
                     "" 0 "" "sigma-ry" "corpus" [] {} 200      \
 | sed -e 's/(uint32\(.*\),)/\1/g'                            )

or

 qdbus  org.freedesktop.Notifications                           \
       /org/freedesktop/Notifications                           \
        org.freedesktop.Notifications.CloseNotification         \
$(gdbus call --session                                          \
    -d  org.freedesktop.Notifications                           \
    -o /org/freedesktop/Notifications                           \
    -m  org.freedesktop.Notifications.Notify                    \
                     "" 5 "" "sigma-ry" "corpus" [] {}  20      \
 | sed -e 's/(uint32\(.*\),)/\1/g'                            )

The notification does not close which would be the case if (UINT32 id) identified with the returned value of Notify.

Some more tests:

 gdbus call --session                                           \
    -d  org.freedesktop.Notifications                           \
    -o /org/freedesktop/Notifications                           \
    -m  org.freedesktop.Notifications.CloseNotification         \
$(gdbus call --session                                          \
    -d  org.freedesktop.Notifications                           \
    -o /org/freedesktop/Notifications                           \
    -m  org.freedesktop.Notifications.Notify                    \
                     "" 0 "" "sigma-ry" "corpus" [] {}     0    \
 | sed -e 's/(uint32\(.*\),)/\1/g'                            )

and even coercing a constant ID, by setting UINT32 replaces_id to 42 and expire_timeout to 0, it is seen that CloseNotification has no influence

 gdbus call --session                                           \
    -d  org.freedesktop.Notifications                           \
    -o /org/freedesktop/Notifications                           \
    -m  org.freedesktop.Notifications.CloseNotification         \
$(gdbus call --session                                          \
    -d  org.freedesktop.Notifications                           \
    -o /org/freedesktop/Notifications                           \
    -m  org.freedesktop.Notifications.Notify                    \
                     "" 42 "" "sigma-ry" "corpus" [] {}    0    \
 | sed -e 's/(uint32\(.*\),)/\1/g'                            )

The notification does not close even though the 42 makes the round trip throughout the methods as confirmed by

dbus-monitor "interface='org.freedesktop.Notifications'"

in the output

method call sender=:1.332 -> dest=org.freedesktop.Notifications serial=3 path=/org/freedesktop/Notifications; interface=org.freedesktop.Notifications; member=Notify
   string ""
   uint32 42
   string ""
   string "sigma-ry"
   string "corpus"
   array [
   ]
   array [
   ]
   int32 0
method call sender=:1.333 -> dest=org.freedesktop.Notifications serial=3 path=/org/freedesktop/Notifications; interface=org.freedesktop.Notifications; member=CloseNotification
   uint32 42

Also note the notification failure of a -1 timeout (documentation is contradictory):

  gdbus call --session                                          \
    -d  org.freedesktop.Notifications                           \
    -o /org/freedesktop/Notifications                           \
    -m  org.freedesktop.Notifications.Notify                    \
                     "" 42 "" "sigma-ry" "corpus" [] {}   -1

though this "works"

notify-send "test" -t -1

ref:
What is the name of the program that displays the notifications? (document contradictions)
How to force a new Notification in notify-osd to show up without waiting for the earlier one to exit?
How do I use 'notify-send' to immediately replace an existing notification?

Bookmark:
Can org.freedesktop.Notifications.CloseNotification(uint id) be triggered and invoked via DBus?


sudo: Forcing Primary Group to 'Domain Users' for [username]

I saw this exact same problem arise on our Ubuntu server.  You are exactly correct.  The answer lies with Samba.  That particular message seems to be printing out because the Samba debug level is set too high.  Because Samba integrates with pam for authentication, it shows up at sudo and su prompts, as they also use pam to authenticate.

The relevant line in smb.conf is:

debug level = n

where n is a number from 0 to 10.  If you're using Webmin, it's in miscellaneous options. (Edit: it was called log level in my smb.conf).

We had our debug set to 3 when we were testing today.  Setting it back to 0 resolved the issue.
I did some testing, and the highest that the debug can be without seeing the message seems to be 2

Also, I ran into the same issue with Google.  This question was the only relevant search result I found.


Get it working with one screen on the nvidia driver?
Run gksu nvidia-settings and under the screen configuration part, get both screens working.
Click the Save X Configuration File button on that same page. This is why you need to run nvidia-settings as root.

Then when you reboot, it should remember your settings.


Ubuntu Server - Is something wrong with the 32 Bit version of it?

There is nothing wrong with Ubuntu 14.04.3 32-bit server.

You can download it by clicking "Alternative downloads...".

The 64-bit version of Ubuntu Server is recommended and it is commonly used. That is why the primary link leads to the 64-bit version.


How do I restore a now empty icon in the favorites launcher after update to 20.04

Open Tweaks, select extensions, select settings, then change the icon to a size that it will display at, on my system it seems to be 32 or 48. It does it immediately. My dock is at the bottom of the screen, and i can see the icon wink in and out as i slide the slider along.


Where can I find release notes/changelog for ubuntu AWS AMIs?

Here.
According to the links in the page I suspect that AWS gets the images from here.

At the bottom of the page, there is a list called "Release Images".
In it is a list of directories, each for a specific release of Ubuntu (Both by number and by name).

In each directory is a list of releases for that version of Ubuntu, and at the bottom of each release directory is another directory called "unpacked".
In that directory is a file called "release_notes.txt". That has what you're looking for, I think.
For example

Note
In some of the less current releases you'll get a "403 Forbidden" error when accessing the "Unpacked" directory.
Even in those if you just slap "release_notes.txt" at the end of the address bar it will still work.


This question was already answered here and here

You can execute the following commands:

ssh-keygen -y -e -f <private key>

Takes a private key an prints the corresponding public key which can be directly compared to your available public keys. (Hint: beware of comments or key-options)

You can use also:

openssl dsa -in <private key> -modulus -noout

Display the public keys corresponding to a private key, then compare them.


Ubuntu 12.10 - VirtualBox not sharing internet with guest system

This is a known bug, either:

Upgrade Virtualbox at least to 4.2.2 (the better way to do it is adding the official repository, see here under Debian based distributions)
Configure dns by hand inside the virtual machine (you can use 8.8.8.8, Google, open dns, or your ISPs server as your virtual machine dns server).


The error occurs when the indicator-multiload is already running. Kill the running process and it most likely runs.

The indicator wouldn't show up on my machine, giving me:

  (indicator-multiload:20479): Gdk-CRITICAL **:
  gdk_window_thaw_toplevel_updates: assertion
  'window->update_and_descendants_freeze_count > 0' failed

I ended up using gnome-system-monitor applet. It's indicator is similar but I miss the summary indicator-multiload gave with just a click. This one simply opens the system-monitor when clicked.


I can' t connect to internet anymore after i tried to deploy algo

Double check your installation steps to ensure nothing was missed:

The easiest way to get an Algo server running is to let it set up a new virtual machine in the cloud for you.

Setup an account on a cloud hosting provider. Algo supports DigitalOcean (most user friendly), Amazon Lightsail, Amazon EC2, Microsoft Azure, Google Compute Engine, Scaleway and OpenStack.
Download Algo. Unzip it in a convenient location on your local machine.
Install Algo's core dependencies. Open the Terminal. The python interpreter you use to deploy Algo must be python2. If you don't know what this means, you're probably fine. cd into the algo-master directory where you unzipped Algo, then run:

$ sudo apt-get update && sudo apt-get install \
    build-essential \
    libssl-dev \
    libffi-dev \
    python-dev \
    python-pip \
    python-setuptools \
    python-virtualenv -y

Install Algo's remaining dependencies. Use the same Terminal window as the previous step and run:

$ python -m virtualenv --python=$(which python2) env &&
    source env/bin/activate &&
    python -m pip install -U pip &&
    python -m pip install -r requirements.txt

List the users to create. Open config.cfg in your favorite text editor. Specify the users you wish to create in the users list.
Start the deployment. Return to your terminal. In the Algo directory, run ./algo and follow the instructions. There are several optional features available. None are required for a fully functional VPN server. These optional features are described in greater detail in deploy-from-ansible.md.

That's it! You will get the message below when the server deployment process completes. You now have an Algo server on the internet. Take note of the p12 (user certificate) password in case you need it later, it will only be displayed this time.

Source: https://github.com/trailofbits/algo/blob/master/README.md

NOTE: I changed ` which python2 ` to $(which python2) because a ` key might be confused with a ' key.


Server ufw port is open, but remote nmap returns filtered

To debug, I restarted the router to factory defaults and now I suspect that the port forwarding was interfering. However, I still find this od


How to play a fixed frequency sound using Python

import math
#sudo apt-get install python-pyaudio
from pyaudio import PyAudio

#See http://en.wikipedia.org/wiki/Bit_rate#Audio
BITRATE = 16000 #number of frames per second/frameset.

#See http://www.phy.mtu.edu/~suits/notefreqs.html
FREQUENCY = 261.63 #Hz, waves per second, 261.63=C4-note.
LENGTH = 1.2232 #seconds to play sound

NUMBEROFFRAMES = int(BITRATE * LENGTH)
RESTFRAMES = NUMBEROFFRAMES % BITRATE
WAVEDATA = ''

for x in xrange(NUMBEROFFRAMES):
   WAVEDATA += chr(int(math.sin(x / ((BITRATE / FREQUENCY) / math.pi)) * 127 + 128))

#fill remainder of frameset with silence
for x in xrange(RESTFRAMES):
    WAVEDATA += chr(128)

p = PyAudio()
stream = p.open(
    format=p.get_format_from_width(1),
    channels=1,
    rate=BITRATE,
    output=True,
    )
stream.write(WAVEDATA)
stream.stop_stream()
stream.close()
p.terminate()


How to Clean Uninstall Ubuntu 12 from free DOS laptop

Kinda wrong forum but... download the OS you would rather have (debian?) and install making sure to use all of the disk. Thats it!


Touchpad suddenly stopped working on boot

It was some hardware issue.  I didn't end up getting all the way to the touchpad, but I removed the hardrive and some other parts and put them back and it's working.  Maybe a wire was pinched or something.  My current xinput shows the Synaptics touchpad which wasn't showing up before.

$ xinput
⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad                id=10   [slave  pointer  (2)]


ubuntu 20.04 LTS numbers in icons help please

okay according to the images you are running xfce-desktop, and you might have used some (special) fonts that got deleted after the upgrade, or in some other way the settings got messed up.
a quick and dirty solution would be to delete them and then let xfcond reset them to the standard - all commands executed in the terminal:

let's stop xconfd: pkill xfconfd
delete the settings rm -rf ~/.config/xfce4/
restart xfconfd: /usr/lib/x86_64-linux-gnu/xfce4/xfconf/xfconfd

after that the issue should be solved ;)


Terminal only shows up as a black window

This is due to an incorrect graphics driver.

First run:

lspci -vnn | grep -i VGA -A 12

To see what type of graphics card you actually have.

Since you have an Intel Graphics card and on 15.10, install the updated driver using this ppa

sudo add-apt-repository ppa:oibaf/graphics-drivers
sudo apt-get update && sudo apt-get dist-upgrade

If all goes well, and if glxinfo is installed, typing in a shell:

glxinfo | grep OpenGL

will print the driver type and version with the PPA custom string.

Do a reboot and this should solve your issue.


installed i3, but no WindowManager choice present on login (Gdm / Ubuntu 18.04)

You need to perform a full reboot, or at least restart gdm, to update the list of sessions, and thus also see your new i3 session. In GDM, the cog icon to select your session is available after having selected your name.


When will 16.04 AMIs be available on the AWS MarketPlace?


Open pdf documents with different Reader

Depending on the DRM, you can open those only with either Acrobat Reader or Adobe Digital Editions. There is no other reader that can open these files. The only option you have - granted you have the permission to do so - is to strip off the DRM with certain tools that you can easily find on the net.


How to delete all `uuid="*-*-*-*-*"` attributes in an XML file using the terminal?

Using sed:

sed -r 's#^(([^\s]*\s)?)uuid="[^"]*"(.*)#\1\3#' file.txt

(([^\s]*\s)?) matches the portion before the portion to be discarded
uuid="[^"]*" matches the block to be discarded i.e. uuid="...."
(.*) gets the rest of the line
In the replacement we have kept only the desired portion using grouped pattern used in matching

Example:

% cat file.txt
<band height="50">
            <line>
                <reportElement x="8" y="10" width="543" height="1" uuid="cab05ad8-976b-42c9-a158-a6260dd630e1"/>
            </line>
            <line>
                <reportElement x="11" y="38" width="543" height="1" uuid="b673c65e-71e4-4e1c-81e0-ece92c094871"/>
                <graphicElement>
                    <pen lineWidth="2.75"/>
                </graphicElement>
            </line>
            <line>
                <reportElement x="11" y="38" width="543" height="1" uuid="f87d4dc0-134f-41ae-a828-bca4169d5eb0"/>
                <graphicElement>
                    <pen lineWidth="2.75"/>
                </graphicElement>
            </line>
            <staticText>
                <reportElement x="343" y="13" width="100" height="20" uuid="58c3c4c4-f76e-48a0-897b-2bf129d1fd01"/>
                <text><![CDATA[Amount /Day]]></text>
            </staticText>
            <textField>
                <reportElement x="449" y="13" width="100" height="20" uuid="8f2e99b5-aa81-49d9-bd0c-a763c37d926e"/>
                <textFieldExpression><![CDATA[$V{day_total}]]></textFieldExpression>
            </textField>
</band>

% sed -r 's#^(([^\s]*\s)?)uuid="[^"]*"(.*)#\1\3#' file.txt
<band height="50">
            <line>
                <reportElement x="8" y="10" width="543" height="1" />
            </line>
            <line>
                <reportElement x="11" y="38" width="543" height="1" />
                <graphicElement>
                    <pen lineWidth="2.75"/>
                </graphicElement>
            </line>
            <line>
                <reportElement x="11" y="38" width="543" height="1" />
                <graphicElement>
                    <pen lineWidth="2.75"/>
                </graphicElement>
            </line>
            <staticText>
                <reportElement x="343" y="13" width="100" height="20" />
                <text><![CDATA[Amount /Day]]></text>
            </staticText>
            <textField>
                <reportElement x="449" y="13" width="100" height="20" />
                <textFieldExpression><![CDATA[$V{day_total}]]></textFieldExpression>
            </textField>
</band>


I also have a Dell Inspiron. My model is 1545. Previous versions of Ubuntu 12.04 (last year) had sound input from my internal microphone without any action on my part. The current update to version of 12.04 no longer accepts the internal microphone unless I use the methods described below. Thus, I used Skype, and sound recorder successfully on previous versions of 12.04 and can use the internal microphone on Windows 7 without intervention, but have to intervene on the latest version. (My laptop is dual-boot). My version of Ubuntu is KXStudio.

I found the solution for this problem on the current 12.04 version by looking at the first entry in the questions section:

Internal microphone not working

If you do not have Pulse Audio Volume control, go to software center and download/install it. Once you have installed it, check your volume control to be sure the volume is OK. Note: The small microphone symbol for each microphone input is effective when it is highlighted in a grey darker than the surrounding window. Otherwise it is mute.


How can I solve a "Version Error" when trying to run rdiff-backup between the latest Ubuntu release and the latest Security Onion release?

In case the remote-server/destination-server is running an old version 1.2.8* and the local-server/source-server in running the new 2.0* version rdiff-backup will not work.
...
version of rdiff-backup is quite different from the local version (2.0.0).

In order to solve this issue with the differences, both the (source-server) and the (destination-server) must be in the same major versions (1.2.x).
The solution is: (tested and worked fine for me)
sudo su
echo 'deb http://cz.archive.ubuntu.com/ubuntu bionic main universe' > /etc/apt/sources.list.d/rdiff-backup-1-2-8-pkgs-ubuntu.list

apt install -y librsync1=0.9.7-10build1 rdiff-backup=1.2.8-7

Confirm the installation version :
rdiff-backup --version

With that source and destination servers with the same version the cms for using rdiff-backups should be fine:
rdiff-backup /PATH backups-server::/path


Ubuntu 14.04 Nvidia Configuration file Location for editing refresh rate manually

/etc/X11/xorg.conf is not present when X server uses autoconfiguration but it should be possible to create a new one. It may be that nvidia-xconfig selects different GPU than the autoconfiguration. You can check which GPU is the X server using in /var/log/Xorg.0.log and compare it with /etc/X11/xorg.conf generated by nvidia-xconfig.

Also, if your adjustments are regarding the GPU, you can set a lot of that in nvidia-settings without the need for xorg.conf.


After the installation could not see any option to boot Ubuntu

Although the symptom is the opposite (you boot straight to Windows; he boots straight to Ubuntu), my answer to this question also applies to your situation.


Permission Issues with /etc/ssl/certs/ca-certificates.crt

Run namei -mo /etc/ssl/certs/ca-certificates.crt.  Match its output to the following:

f: /etc/ssl/certs/ca-certificates.crt
 drwxr-xr-x root root /
 drwxr-xr-x root root etc
 drwxr-xr-x root root ssl
 drwxr-xr-x root root certs
 -rw-r--r-- root root ca-certificates.crt

You can use chmod and chown to get everything back to the correct settings:

sudo chown root /  && chown root /etc/ && chown root /etc/ssl/ && chown root /etc/ssl/certs/ && chown root /etc/ssl/certs/ca-certificates.crt
sudo chmod 755 /
sudo chmod 755 /etc/
sudo chmod 755 /etc/ssl/
sudo chmod 755 /etc/ssl/certs
sudo chmod 644 /etc/ssl/certs/ca-certificates.crt


Ubuntu 15.04 kernel 3.19+ Intel Wireless AC-7260

There is no other driver than the one provided by Intel for this wireless card.

However sometimes connection issues can be resolved by:

unplugging your computer from the power line (just power off will not be sufficient) to reset the device.
unplugging the antennas cables from the card, and re-plugging in a changed order


What's the best way to re-enable PPAs/repos after an upgrade?

You need to add them all back/re-enabled them individually by uncommenting the lines in the files in the /etc/apt/sources.list.d/ directory.

Though upgrade time is a good time to reevaluate if you need the PPA in the first place if you were just using one to get a newer version of a package.


How do I free hard disk space allocated by Virtual Box disks?

Start VirtualBox and from File->Virtual Media Manager remove your virtual disks.


A Disk Read Error Occured. Press CTRL+ALT+DEL to restart

I had the same problem. It appears that either grub2, or the way Ubuntu implemented grub2, does not detect Windows partitions properly. I had a co-worker help me with this. First get grub working. Then I added the code below in /etc/grub.d/08_custom. Then update-grub. This puts Windows above Ubuntu so it will boot by default.

If you wish to boot Ubuntu by default, modify 40_custom instead. This will create a new entry for Windows along with the useless entry that was originally found. Select the custom entry to boot Windows. My new grub.cfg is at http://paste.ubuntu.com/1368590/.

Here is the contents of my 08_custom:

#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
    menuentry 'Windows 7 (customized entry)' {
    insmod part_msdos
    insmod ntfs
    set root='(hd0,msdos1)'
    chainloader +1
}


ALT+SysRq+REISUB hangs at "resetting" (without actually resetting/restarting)

Alt + SysRq +

R - takes keyboard and mouse control from the X server. This can be useful if the X-Server crashed, you can change to a console and kill the X-Server or check the error log.
NOTE:- The documentation refers to this key's task as "Turns off keyboard raw mode and sets it to XLATE", but I suppose it's safe enough to assume that it takes back control from X.

E - sends SIGTERM to all processes except init. This means that an attempt is done to end the current processes except init, safely, e.g. saving a document.

I - sends SIGKILL to all processes except init. This means that all the processes except for init are killed, any data in processes that are killed will be lost.

S - writes all data from the disc cache to the hard-discs, it is a sync and is necessary to reduce the chances of data corruption.

U - remounts all mounted filesystems read-only. After using this key, you can reboot the system with Alt+SysRq+B without harming the system.

B - restarts the system without making steps to ensure that the conditions are good for a safe reboot, using this key alone is like doing a cold reboot.

Try without pressing R at begining of your sequence
or just do it in another seq.. give a litle time between those keystrokes and do this..

Alt + SysRq + R S E I U B

and better you enable Magic SysRq by entering..

echo 1 > /proc/sys/kernel/sysrq


lansdcape - is there a clustered solution

If you are referring to the landscape-scalable juju bundle, you are correct, as the configuration is to have units spread on different machines. However, the services used in this bundle (postgresql, rabbitmq-server, haproxy, landscape-server) support clustering to some extent. Depending on your needs and the load, you can call juju add-unit <service-name> to effectively cluster and/or scale some of those services and have fallbacks.

I suggest you also check the documentation of those individual juju charms  (rabbit, haproxy, postgres), as those charms have a few options related to clustering/fallbacks,


How can I get the fixed version of deja-dup installed?

sudo apt-get install sbackup

This app is nearly the same as deja-dup. One minor flaw is that it is supposed to display status in the notification area but doesn't. I've found some other options, if this one doesn't work out but so far it's working fine.

-OK one additional caveat. It doesn't handle spaces. If you have spaces in the path for your backup drive, you will have to rename the drive using gparted. This doesn't mean you have to erase the drive.