How do you determine the combined width of the components in a Row {}?

Why do you think it does not work?

The following snippet of code works correctly for me:

import QtQuick 2.0
import Ubuntu.Components 0.1

MainView {
    id: root
    width: units.gu(100)
    height: units.gu(100)

    Row {
        id: row
        spacing: 2
        Rectangle { color: "red"; width: 50; height: 50 }
        Rectangle { color: "green"; width: 20; height: 50 }
        Rectangle { color: "blue"; width: 50; height: 20 }
    }

    Component.onCompleted: {
        console.log(row.width)
    }
}

I see 124 displayed on the console (50+2+20+2+50). So the Row width gives you not only the width of each combined elements but also takes into account the spacing between them.

If you need the width of the combined elements without the spacing, you can use the following method:

console.log(row.width - (row.children.length - 1)*row.spacing)

Update:

To only get the width of the components within the row you need to iterate over all the children:

import QtQuick 2.0
import Ubuntu.Components 0.1

MainView {
    id: root
    width: units.gu(100)
    height: units.gu(100)

    Row {
        id: row
        spacing: 2
        Rectangle { color: "red"; width: 50; height: 50 }
        Rectangle { color: "green"; width: 20; height: 50 }
        Rectangle { color: "blue"; width: 50; height: 20 }

        property var children_width

        Component.onCompleted: {
            children_width = Qt.binding(function() { var i, w=0; for (i in children) {w += children[i].width}; return w });
        }

    }

    Component.onCompleted: {
        console.log(row.children_width)
    }
}

The new children_width property value is 120.


How to install packages from Ubuntu installation media offline?

Offline install of dkms. Not network, install media on USB Stick
With Bionic Desktop install media, usb stick on /dev/sdb1

Backup /etc/apt/sources.list Mount USB key and create new /etc/apt/sources.list
Install dkms
Revert changes on /etc/apt/sources.list

Backup sources.list and prepare new source

sudo cp /etc/apt/sources.list /etc/apt/sources.list.BCK
sudo touch /etc/apt/sources.list
if [ ! -d /media/apt ]; then sudo mkdir /media/apt; fi
sudo mount /dev/sdb1 /media/apt
sudo apt-cdrom add --cdrom=/media/apt
sudo apt-get update

Install

sudo apt-get install dkms

Revert changes on /etc/apt/sources.list

sudo umount /dev/sdb2
sudo rm /etc/apt/sources.list
sudo mv /etc/apt/sources.list.BCK /etc/apt/sources.list


you cant get the mp3 song from spotify, however you can use the information that provide spotify in order to download it in other place (information like name of the song, length and so on), this little app offers that:
https://github.com/frosas/spotify-to-mp3
the instalation setup and usage is written in there, its very easy to use.

If you have problems installing this app, probably is because you are using an old version of ruby (by default is 1.8.7), you need to upgrade it to 1.9.2 and then install the app.

Hope that helps.


The IcedTea control panel is launched using the command itweb-settings from a terminal.


There's a bug on Exaile Launchpad, actually a plugin doesn't exist and the bug is marked as wishlist. On exaile-users group on Google Groups you can find an interesting answer by Adam Olsen (Exaile Developper), the same guy who marked as wishlist the bug.
By the way here there's the old working plugin.


Pop in your Ubuntu cd or usb, then hit Install Ubuntu. When it presents you with options such as "Erase Ubuntu and Reinstall", "Erase Windows 8 and install Ubuntu", "Upgrade Ubuntu",  make sure you are erasing your old Ubuntu installation and not Windows 8.

Take a look at this image:
http://i1-news.softpedia-static.com/images/extra/LINUX/large/ubuntu1104installation-large_003.jpg

You need to click "Upgrade Ubuntu".


Gambas3 has an option to install UnitySC which lets you fill out a form and create items which will appear in Unity Dash. The unity plugin, doesnt create an application interface, but you can do that with gambas. Instead, you run UnitySC and fill the form accordingly, to get a link to the item in dash, and Icons, comments, etc.

So, when I compiled Gambas3, It did not make an Icon for gambas3 in the Dasah menu. Ah, but I can fix that right now!
here using the UnitySC tool, I added gambas3 to the dash menu, and to the unity bar, with the Icon I screen captured from the gambas website.


Accidentally deleted the Ubuntu partition

You can install GRUB on your hard disk. You can do this by using putting the LiveCD on a flash disk ( How can I make a Ubuntu Live USB with Ubuntu, GParted & HBCD? )

Boot to the Flash Disk. When you get the Ubuntu Live Desktop, Open terminal ( What is a terminal and how do I open and use it? ) and type the following:

sudo grub

This will get you a grub> prompt (i.e. the grub shell).
At grub>. enter these commands

find /boot/grub/stage1

This will return a location. If you have more than one, select the installation that you want to provide the grub files.
This is important: what was returned for the find command use it in the next line for the "?" -

root (hd?,?)

Again use the value from the find command i.e. if find returned (hd0,1) then you would enter root (hd0,1)
Next enter the command to install grub to the mbr

setup (hd0)

Finally exit the grub shell

quit

Now you are done. Reboot the machine.

Another option is to run this command:

grub-install /dev/hda


"No required driver detected for unity" on Apple iBook G4

Unity requires accelerated graphics. You have ATI graphics and a PowerPC CPU. This configuration is not supported by the official drivers. However, the open source drivers should work. These drivers are built in but you may need to enable them.

Instuctions on how to do this and other information can be found of the Ubuntu Wiki.

This should allow Unity to run.


How do I run a global npm program when an ubuntu program has the same name?

Assuming you don't need the weather program ncu which is causing the conflict, the easiest solution would be to uninstall it using:

npm uninstall -g ncu


I added the following source line to apt configuration source list:

deb http://cz.archive.ubuntu.com/ubuntu trusty main

then i can install acl normally.


Can Ubuntu adapt itself automatically when there is a hardware change?

There are four questions in one:

If I change the RAM

YES the new RAM is recognized.

I change the GPU

This will require installing new drivers. You need to post a question on your specific GPU. It's almost certain after changing GPU you'll have to interrupt grub boot with e and edit command line with nomodeset, or nouveau.modeset=0, or nvidia.modeset=0 or radeon.modeset=0depending on what the old GPU was.

If I install Ubuntu on a SSD (SATA III or NVMe m.2) and later move it to a new computer with different CPU and motherboard.

Yes. But see summary below.

If I change the CPU or the motherboard

Yes. But a new CPU might require a microcode update for optimum performance. Note I think this is really the same as question 3, but in reverse.

Summary

Linux does things on the fly unlike Windows which locks you into drivers that must be installed during system setup. Any piece of hardware in Ubuntu though may require a grub override for successful booting. These you can fix on the fly though by pressing e in grub to edit the command line and pass the appropriate parameters to the kernel. Then after successful boot, make permanent changes in /etc/default/grub and run sudo update grub.


I actually had wrong repository. Everything was fine once I removed it.

Thanks to @RoVo for helping me out :)


How do I change what happens after I insert an audio CD?

Open your system settings.

Click on Details.

Click on Removable Media.

Select the Audio CD dropdown menu, and select "Do Nothing."

Alternatively, you can disable "autorun" for all removable media by checking the box that looks like this:

I'm using 12.10, but I remember 12.04 having the same procedure.


Open a terminal, and type sudo fdisk -l (your USB flash drive should show up in the list if it is inserted).
Now, type sudo grub-install /dev/<insert flash drive name here> to install it on your flash drive.

for example:

sudo grub-install /dev/cookies

Be careful with these commands (don't mess up) or you could damage your system. Make sure you are installing to the flash drive and not something else.

I'm not completely sure that this will allow you to boot your system as you wish, but if it doesn't you can edit your grub configuration on the flash drive to find your built in hard drives.


{ ./can.sh > canny.log & x=$(pidof -s /bin/bash ./can.sh) ; echo > cpu.log ; } && { while test $x == $(pidof -s /bin/bash ./can.sh) ; do top -p $x -bn 1 >> cpu.log ; sleep 5s ; done ; }

can.sh was my process.. The first line of can.sh is a sleep 1s, which is needed to ensured $x is established.
EDIT... after looking at this, this took your design and made it execute without error.... But it does not actually work for what you intended... Your test.sh(my can.sh) is a script executing commands... scripts don't use CPU... the commands they execute will use the CPU... so you won't see that reflected with this method. I will leave it there just in case you can figure out how to get top to give you the called commands CPU usage.
... pidstat would have been better... but still presents the same problem. I won't bother using a script for the example... just a command.
:~$ pidstat 1 -e dd if=/dev/zero of=/home/thecarebears/pinecone.txt bs=1024 count=1000000

Linux 5.4.0-51-generic ()   10/30/2020  _x86_64_    (2 CPU)

07:51:54 PM   UID       PID    %usr %system  %guest   %wait    %CPU   CPU  Command
07:51:55 PM  1000    237570    9.00   90.00    0.00    0.00   99.00     1  dd
07:51:56 PM  1000    237570    8.00   91.00    0.00    0.00   99.00     1  dd
07:51:57 PM  1000    237570    0.00   11.00    0.00    0.00   11.00     1  dd
1000000+0 records in
1000000+0 records out
1024000000 bytes (1.0 GB, 977 MiB) copied, 3.81999 s, 268 MB/s

Average:     1000    237570    5.67   64.00    0.00    0.00   69.67     -  dd

displays cpu statistics, in this case, every 1 second, until the specified command finishes... The command is dd (with parameters), but if i run dd inside can.sh, pidstat  1 -e can.sh will show 0% cpu, because dd is the command that is being executed by the script... I don't know the magic to make a script appear to the OS as a command(if it exists)...
So if you have a command that you want to monitor, instead of a script, both of these will work... If you cannot get around that, then you may have a little more figuring to do... unless someone else chimes in with some additional knowledge.


Reboot back in the hard drive (looping login) version of Lubuntu. Rather than attempting to log in, press CTRL + ALT + F1 to enter the terminal screen. It should be able to log in there without a problem.


Remove Ubuntu Studio Desktop Package from Ubuntu 14.04 LTS

Things like ubuntustudio-desktop are called meta packages, packages without any real content, but that pull in a bunch of other packages as dependencies. This makes them rather tricky to remove without the logs.

I've looked through the stuff ubuntustudio-desktop pulls in and figure you should be able to safely remove the following packages:

sudo apt-get remove ubuntustudio-desktop xfce4-cpugraph-plugin xfce4-dict xfce4-fsguard-plugin xfce4-indicator-plugin xfce4-mailwatch-plugin xfce4-mixer xfce4-mount-plugin xfce4-netload-plugin xfce4-notes-plugin xfce4-places-plugin xfce4-power-manager xfce4-quicklauncher-plugin xfce4-screenshooter xfce4-smartbookmark-plugin xfce4-systemload-plugin xfce4-taskmanager xfce4-terminal xfce4-verve-plugin xfce4-volumed xfce4-weather-plugin xscreensaver xscreensaver-data xscreensaver-gl xubuntu-icon-theme ubuntustudio-default-settings ubuntustudio-icon-theme ubuntustudio-lightdm-theme ubuntustudio-look ubuntustudio-sounds ubuntustudio-wallpapers xfce4-appfinder xfce4-notifyd xfce4-panel xfce4-session xfce4-settings xfdesktop4 xfwm4 plymouth-theme-ubuntustudio

That should clean out almost everything you don't want.

Take a quick look through, just to make sure you don't recognize anything you want to keep. From what you've said in your question I don't think there will be anything.


How do I undo those partitions I made for dual booting?

There is some missing information in your question that makes it ambiguous.

1) IF the version of windows is OEM (as in the windows disk is made by dell or hp or whatever) than Install Windows first (one the whole disk)- then use windows dskmgr to shrink the filesystem / partition down -  create empty/unused space and make the ufi/uefi partition just a little bit larger - not sure what the max is, it is easy to look up tho - Then install Ubuntu in the unused space and put the ubuntu ufi/uefi file in the same partition as the windows one. The installer will automatically setup your mount points and swap space in the empty space you designated.

2) IF the version of windows is NOT an OEM (as in you have a genuine micr0$0ft disk) than you can and should use ubuntu/gparted to setup your partitions - (windows system partition / ubuntu system partition / UFI/UEFI boot partition / shared free space partition / win space part / ubuntu space part) as an idea - really however you want it. - necessary partitions tho is win part - ubuntu part - ufi/uefi part. - the installers will make their own mount points and swap spaces within the space you designated for each system.

I understand that you have gone through with the install already - however if you want to start over the above should give you a better jumping off point.

Once both systems are installed GRUB2 needs to be able to manage the UFI/UEFI primarily (NOT Windows) - Anytime micr0$0ft updates my laptop (dual booted with Ubuntu studio 14.04 and win 8.1) and corrupts my grub I use this tool -

http://sourceforge.net/p/boot-repair/home/Home/

I just created a bootable USB with the image and keep it in my collection - Honestly, I just run the "recommended repair" and follow the steps - sometimes a couple times - and it does the trick

hope this helps!!


Does

sudo umount /dev/cdrom
sudo eject /dev/cdrom

work?

If not can you eject the CD whilst the PC is at the BIOS screen?


I upgraded ubuntu to 12.10, and the internet does not work on vbox

I had exectly same issue. You need to upgrade the VirtualBox to 4.2.X (that helped me)

Add one of the following lines according to your distribution to your /etc/apt/sources.list:

deb http://download.virtualbox.org/virtualbox/debian precise contrib

than:

wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -
sudo apt-get update
sudo apt-get install virtualbox-4.2

More about installation and post install steps you can read here:
https://www.virtualbox.org/wiki/Linux_Downloads


Can I create an Ubuntu installation in my pendrive but not volatile in order to keep my data in a future boot?

I think whether this is possible or not depends on your pendrive's storing capacity.

You can take a look at the official guide to create a bootable Ubuntu USB here (pay attention to step 6)

http://www.ubuntu.com/download/desktop/create-a-usb-stick-on-ubuntu


Is it possible to "stop" a particular unit in juju?

This can't currently be done from Juju itself, but you can go to the cloud provider's console and stop the instance that way.  You just need to run juju status, which will give you the instance ID, and then you can go to the cloud provider and stop the instance manually.


Trying to update Java on Linux (Linux installed by Crouton)

I found out yesterday that 'webupd8team' is a private repository, managed by one guy. Exactly one year ago there was a similar problem, and that was a license issue as I understand.

I fixed it with an answer provided here -> https://ubuntuforums.org/showthread.php?t=2374686

cd /var/lib/dpkg/info && sudo sed -i 's|JAVA_VERSION=8u181|JAVA_VERSION=8u191|' oracle-java8-installer.*

sudo sed -i 's|PARTNER_URL=http://download.oracle.com/otn-pub/java/jdk/8u181-b13/96a7b8442fe848ef90c96a2fad6ed6d1/|PARTNER_URL=http://download.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/|' oracle-java8-installer.*

sudo sed -i 's|SHA256SUM_TGZ=.*|SHA256SUM_TGZ="53c29507e2405a7ffdbba627e6d64856089b094867479edc5ede4105c1da0d65"|' oracle-java8-installer.*

sudo sed -i 's|J_DIR=jdk1.8.0_181|J_DIR=jdk1.8.0_191|' oracle-java8-installer.*

And then finally:

sudo apt-get -y install oracle-java8-installer

Hope this helps you :)


How to have sub-layouts of a specific keyboard layout in Ubuntu?

There are many shortcuts to choose to switch between keyboard layouts, but none fits with what you want.
Anyway, it can be done using some tricks.
a) Switch directly between English (English US, English UK) and German
First, create the script, let's call it change_layouts:
#!/bin/bash

en_layouts="['us', 'gb']"
de_layouts="['de']"

current_layouts=$(gsettings get org.gnome.libgnomekbd.keyboard layouts)

if [ "$current_layouts" = "$en_layouts" ]; then
    gsettings set org.gnome.libgnomekbd.keyboard layouts "$de_layouts"
else
    gsettings set org.gnome.libgnomekbd.keyboard layouts "$en_layouts"
fi

Save the script in your ~/bin directory and don't forget to make it executable:
chmod +x ~/bin/change_layouts

Now you can test the script in terminal. Run it more times to see how it works.
Second, add a custom shortcut for this script. Go to System Setting → Keyboard → Shortcuts → Custom Shortcuts and follow the instructions from the below image:

For some reasons, at least in my case, if I set the Alt+Shift shortcut, this will not run the script. Maybe this is a bug. But there are many other choices, like Alt+Shift+1.
b) Switch directly between English US and English UK (when English is chosen)
Go to System Setting → Keyboard Layout → Options → Key(s) to change layout and tick Ctrl+Shift:

Related:

Advanced keyboard layout options


Look at
⚙ Settings | Devices | Removable Media | Other Media... | Blank x Disc. Assign the application you normally use for optic disk burning there.


Is a GNOME3 fallback session without the panels possible on the LiveCD?

Make a custom live iso using a tool like Relinux.
A helpful guide for using it is Here.
Configure your os as you see fit, add/remove apps and configure settings.  Then, to have those settings be used as default you need to copy them to /etc/skel but leave out any big files you don't need as to keep the iso size down below 4gb, or else it won't work.
In a terminal, run sudo cp -r . /etc/skel/ then gksu gedit /etc/lightdm/lightdm.conf and make sure the line user-session= says the name of the session you want as default.  Then you can go ahead and follow the instructions for using Relinux


No boot option for Windows after Boot Repair

Running sudo update-grub in a terminal will make GRUB scan for installed OSes and add Windows to the list.


The order of the options in an ffmpeg command matter. Your options currently apply to the input files, which are jpg graphics. Try changing the order of the options so options related to the output file come after the input file:
ffmpeg -f image2 -pattern_type glob -framerate 12 -i *.jpg -vcodec libx265 -crf 10 output.mp4


Bluetooth on laptop doesnt work. Ubuntu 15.04

You need to Install Bluetooth.

sudo apt-get install linux-headers-generic build-essential
wget https://www.dropbox.com/s/3jqigkapf383tod/bluetooth-15.04.tar.gz
wget https://www.dropbox.com/s/qgcu075lvvzq690/BCM20702A0-413c-8143.hcd
sudo cp BCM20702A0-413c-8143.hcd /lib/firmware/brcm/
tar -zxf bluetooth-15.04.tar.gz
cd bluetooth
cp /boot/config-$(uname -r) .config
cp /usr/src/linux-headers-$(uname -r)/Module.symvers Module.symvers
make -C /lib/modules/$(uname -r)/build M=$PWD modules
sudo cp btusb.ko /lib/modules/$(uname -r)/kernel/drivers/bluetooth/
sudo modprobe btusb

Then check to see if firmware loaded dmesg | tail please post this in a comment or edit your question to include

echo btusb | sudo tee -a /etc/modules

When your kernel updates, the bluetooth will fail until you

cd bluetooth
make -C /lib/modules/$(uname -r)/build M=$PWD clean
cp /boot/config-$(uname -r) .config
cp /usr/src/linux-headers-$(uname -r)/Module.symvers Module.symvers
make -C /lib/modules/$(uname -r)/build M=$PWD modules
sudo cp btusb.ko /lib/modules/$(uname -r)/kernel/drivers/bluetooth/
sudo modprobe -r btusb
sudo modprobe btusb
Source: Ubuntu 15.04 - Bluetooth - No adapters found - Dell Precision M4800


This method worked for me.

After you paired to the device and connected connected successfully, discover services that are using rfcomm on the remote device:

sdptool browse <remote_dev>
sdptool browse 12:34:56:78:11:22

take note of all the possible rfcomm and their channels (remote_channel)

Now create a virtual rfcomm device on our machine:

rfcomm listen /dev/rfcomm0 2

you can replace 2 with any value. it is our channel

Then bind the remote rfcomm to our virtual rfcomm device:

sudo rfcomm bind <virtual_rfcommdev> <remote_mac> <remote_channel>
sudo rfcomm bind /dev/rfcomm0 12:34:56:78:11:22 2

if you prefer a one liner

 rfcomm bind 0 12:34:56:78:11:22 1

You can check if it is worked by sending it a test AT command

first install picocom:

sudo apt install picocom

then check if the device is present:

ls /dev/rfcomm*

then start picocom on the rfcomm:

sudo picocom -c /dev/rfcomm0

-c to make the command visible as you type

you get sometime like

picocom v2.2

port is        : /dev/rfcomm0
flowcontrol    : none
baudrate is    : 9600
parity is      : none
databits are   : 8
stopbits are   : 1
escape is      : C-a
local echo is  : no
noinit is      : no
noreset is     : no
nolock is      : no
send_cmd is    : sz -vv
receive_cmd is : rz -vv -E
imap is        :
omap is        :
emap is        : crcrlf,delbs,

terminal is ready

now type AT and press enter. If you get OK then it working.


Ok, the issue here is that you tried flashing it without mounting, make sure the path is /mnt/ or /media/, so you are sure you have mounted properly.

If I were you I would use a GUI for this sort of thing.


It may turn out that the script does not have executable permission.

1.Make the script executable using

sudo chmod +x install.sh

2.Run the script using

./install.sh

If you get an error indicating bash: ./install.sh: Permission denied' , run the command with elevated privileges

sudo ./install.sh


It's more recommend to create a VM and install iTunes on it, so that you can perform a full/complete backup.

To create a VM, there is a official doc via wiki: https://help.ubuntu.com/community/VirtualBox.

Another discussion: How to install Windows 7 inside Virtualbox of Ubuntu?

Hope this can help you.


On Ubuntu 14.04 LTS try

unity --replace

or, if you are running 12.04 LTS, try

unity --reset


You can install qalculate 0.9.7-6ubuntu2 package from official repository with

sudo apt-get install qalculate

If you want to compile it manually you should install its build-dependencies with

sudo apt-get build-dep qalculate

and then create deb-package and install it with checkinstall.


Ubuntu 14.04 booting, behaves like a spoiled child

It might be due to the issue with grub, so check for the grub and then update it to the latest by using command,

apt-get update

else

apt-get upgrade

Hope this helps.


What are all the autostart locations in Ubuntu?

The possibilities are (essentially) endless. Scripts and applications can trigger other scripts and applications that don't live any of the places listed.

The 'bootchart' package is one good way to list (and display) all applications, what started them, and when in the boot cycle they started. It is also handy for discovering the cause of an unusually-long boot. It works for the system it is installed on, not for the hypothetical any-given-install.


you must re install grub, the easiest way is to log in with a live usb disk of ubuntu , then mount your ubuntu partition lets say it is mounted at /media/ubuntu, then go to terminal and do:

sudo grub-install --boot-directory=/media/ubuntu sda

hope my syntax is correct ;)


Refused to connect-to same machine's local ip address (192.68....)

Hello and welcome to AskUbuntu!

As you can see from netstat, your service is listening only on localhost:

tcp        0      0 127.0.0.1:8080          0.0.0.0:*               LISTEN      5879/ng
                    ^^^^^^^^^^^^^^

You should change your ng command to:

ng serve --host 0.0.0.0 --port 8080

so it will listen on port 8080 on all available IP/Interfaces on your machine.


Restore the /var/lib/dpkg/status file from its backup file (/var/lib/dpkg/status-old). Open the terminal and type:

sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status

Then run sudo apt update again.

If that doesn't work run the following commands:

sudo touch /var/lib/dpkg/status
sudo apt update && sudo apt upgrade
sudo reboot
sudo apt full-upgrade


How to downgrade to a specific PPA version of LibreOffice?

One way to do this would be to manually download the necessary .deb files from the PPA, then using sudo dpkg --force-downgrade -i your_libo_package.deb. Be careful with this option and be sure to have read man dpkg before using it.

For a more detailed account of this downgrade procedure see:

How can I downgrade packages without removing their dependants?


Binding hotkey for toggling wireless card state - System76 Bonp3

Unfortunately, the Fn+Fx key bindings are controlled by the BIOS and not something that can be changed in the Ubuntu side of things. Go ahead and open a support ticket at the System76 My Account Page. We may be able to get you a new keyboard for your Bonobo.


How can I avoid having to manually type "sudo modprobe ndiswrapper" to initiate my usb wifi

You can set up a cron job for this that is run at every reboot. Modify the root crontab by typing sudo crontab -e and add the line

@reboot <whatever you want to do>

Hope this helps.


How can I change the port of Remote Desktop?

For Ubuntu 12.04 you can do that via the gsettings command. This changes the port to 1234:

gsettings set org.gnome.Vino alternative-port 1234
gsettings set org.gnome.Vino use-alternative-port true

To see all the options for Vino:

gsettings list-recursively org.gnome.Vino


First, some Logging advice:
# do this once (or forever have to `sudo journalctl`)
sudo adduser $USER systemd-journal
# then either logout/login or `newgrp systemd-journal`

# add to ~/.bash_aliases or ~/.bashrc
# tsjou "18-11-01 01:55:28" for journalctl --since
alias tsjou="date '+%y-%m-%d %H:%M:%S'"
# use other `date` options, e.g. `tsjou --date=yesterday`
# make "journalctl" easier to type
alias jc=journalctl

# record beginning for journalctl (a thumbtack in the log flow)
alias jstart="my_JSTART_TIME=\"\$(tsjou)\""
# show all logs since `jstart`
alias jend="journalctl --since=\"\$my_JSTART_TIME\""

# what happened in the last 5 or 10 minutes?
alias jc5="journalctl --since=\"-5 minutes\""
alias jc10="journalctl --since=\"-10 minutes\""
# what has NetworkManager logged since boot?
alias jcnet="journalctl -b 0 _SYSTEMD_UNIT=NetworkManager.service"

Then, once you have read access to the logs, your journalctl --since=... should work.
Read man journalctl date.


Persistant File System vs Installation onto USB stick

I think the persistent file system only doesn't delete data that already exists in the SquashFS file, ie. what's already there by default. So if you try to uninstall, say, Firefox, then you won't get space. However, if you install a new program, like Pidgin, and then later uninstall Pidgin, then you will free up your space.

So if you're only going to install and not going to remove what you've already installed, then persistence is the best option is to use a persistent file system, because if you do a full install then it'll take up more space.
Full install takes up more space because when you do an install then it uncompresses what was in the (highly compressed) SquashFS filesystem.

If there are some programs in the default ISO that you are not going to use, then I suggest you use UCK (Ubuntu Customization Kit), which lets you customize the Ubuntu ISO, to remove those programs and maybe install/update any programs you want to use. That way all those changes will be in the SquashFS filesystem as well, so everything will be compressed and you'll have more free space left at the end of it.

This is what I have been doing for some time now and it's been working nicely.


Few errors while apt-get upgrade and apt-get install?

You'll have to install libcheese first. Then try this one.
Hope that helps :)


No wifi in 12.10 Broadcom BCM4313 Samsung RF511

Please get a temporary wired ethernet connection and open a terminal and do:

sudo apt-get install linux-headers-generic
sudo apt-get install bcmwl-kernel-source
sudo modprobe wl

Your wireless should then be working. I don't believe b43 and firmware is optimal for 14e4:4727.


To put it simply, there's no Ubuntu or Debian based distro that will fit the size requirements you're stating.  Not even headless.

Your closest bet is Damn Small Linux which is a very TINY linux distro.  However, it is not Ubuntu nor Debian based, to my knowledge.

If your intent is to have Ubuntu or Debian, have your VM provision 10GB max for the virtual disk, and let it expand in size as needed - this will give it ample 'space' from the Linux point of view, but it will take at most 10GB + amount of vRAM you assign when you save the system.


How to display popup dialog after app start?

PopupUtils.Open(dialog, id) is meant to wok for buttons.

Hence, add a button with the visible property as false and pass the id of that hidden button in place of "id" above (Without quotation of course).

Source:

  Had the same problem :)


A little bit of investigation, and I have confirmed that the encryption process worked. I created an Ubuntu boot usb drive, and booted my laptop from that, and when I tried to access the 'eddy' home directory it contained only the four items; Access-Your-Private-Data.desktop, .ecryptfs, .Private and README.txt. While if I looked in the home directory of another account then it contains all of the usual directories.


Cannot set Google Chrome as default browser

I discovered the source of my problem. The global location for .desktop files is /usr/share/applications/ The user specific location is ~/.local/share/applications. For whatever reason, there was a google-chrome.desktop file in that directory that did not have the MIME meta data setup correctly. Since the local file overrides the global file, Google Chrome wasn't recognized as a web browser. Once I deleted that file I could set Google Chrome as my default web browser and now links open in it correctly.


How can I write a review for an item on iTunes on Ubuntu?

If it isn't detailed on the support pages, I doubt you could do it. Given Apple's unwillingness to support Linux users on all products is highly possible that there isn't a way unless you install iTunes, and even then, the store may not be available at all.


How to make songs start later on rhythmbox?

I assume you are referring to the crossfade functionality in the music players. You can enable that feature in Rhythmbox also.

Go to the Rhythmbox menu. (It is located at the top panel in Unity panel, when Rhythmbox is current active window)
Select Edit → Preferences . Preference window will open
Select the Playback tab.
Enable the Crossfade between tracks option by selecting the checkbox.
Move the slider below Crossfade duration label to the right until the time value reaches 30 seconds.

You're done. See a screenshot below


Is it possible to set up IDLE with 2.7 and 3.2?

Yes - they work as separate packages in the Ubuntu repositories.

IDLE for 2.7 can be installed with sudo apt-get install idle
IDLE for 3.2 can be installed with sudo apt-get install idle3


You need to add the PPA not just download a deb file. That's why they redirect you here https://launchpad.net/~bitcoin/+archive/bitcoin wich has the instructions to add the PPA.

https://launchpad.net/+help-soyuz/ppa-sources-list.html

easy peasy :) Just follow the instructions.


You can always install Synaptic from Ubuntu Software Center. From there, you can purge.

sudo apt-get purge will also do the trick from the command line. See man apt-get.


How can I reset the permissions of /var?

One way is to install another machine or VM with the same version of the OS and on that machine run this two commands:

find / -exec stat --format "chmod %a %n" {} \; > /tmp/restoreperms.sh
find / -exec stat --format 'chown %U:%G %n' {} \; >> /tmp/restoreperms.sh

command 'find' finds the root directory and checks for their permissions using 'chmod' and save it to a temporary permission file.

Or this one that combines both:

/usr/bin/find / -exec /usr/bin/stat --format="[ ! -L {} ] && /bin/chmod %a %n" {} \; -exec /usr/bin/stat --format="/bin/chown -h %U:%G %n" {} \; > /tmp/restoreperms.sh

then, copy the /tmp/restoreperms.sh file to the machine with broken permissions:

scp /tmp/restoreperms.sh user@ip_address:/tmp/

scp securely copies the permissions stored to a temporary directory /tmp/
and execute it from there.


Xorg crashing: ubuntu automatic logout, back to login screen

This is the same problem i GOT once

Whathappened to your system is:

You have misconfigured or messedup with xorg while tweaking your system

Solution

Try to enter with someother user Like Guest if, Yes than
Logout guest and press ctrl+alt+F2 to enter your Terminal mode.
Login with your user which has sudo powers
Create a new user and add this user to sudo group

sudo adduser username

sudo adduser username sudo

now logout and login with newly created sudo user and delete your messedup user
thats it.

Other solution

Install other GUI for system i.e Gnome

goto terminal mode by pressing ctrl+alt+F2

install gnome

sudo apt-get install gnome-panel

This will install gnome 3, gnome classic and gnome-classic without effects
to enter gnome on your login screen press unity icon and you will see the list of interfaces to choose from.

HOPE this will help


Is this a Unity Dash bug or Aptana Studio 3 bug? Icon in Dash being displayed really large.

This problem is due to a recent (not sure when) change in the way Unity displays icons.  Aptana Studio 3 provides a .xpm file to use as the icon, which is what I'm assuming you're using.  That's when this behaviour is seen and I've concluded that Unity can not resize .xpm images.

The fix is as simple as converting the .xpm file into a Unity friendly .png file that it can resize properly.  You can do this online pretty easily at a site like http://www.convertmyimage.com/.

Once you get the converted .png file, make sure you update your .desktop file to reference this new .png and you should be all good to go.


Kubuntu 11.10 Lot of Networking problems

I had a lot of networking problems with 11.10 Server. This may help.

First off I had to create /var/lib/dhcp3 and run update-rc.d -f apparmor remove.

Apparmor was configured for use with network manager, which is not even installed on Ubuntu Server 11.10 (or any Ubuntu Server release).

I can't imagine how a missing directory like /var/lib/dhcp3 passed a smoke test.


How to totally remove Ubuntu and install Lubuntu?

I have over came on issue which avoid me to format whole OS through BIOS settings . I had burned Lubuntu ISO to USB but couldn't see USB because of Secure Boot Mode was enable.

I've disabled it and then saw the Lubuntu installer USB on Boot Options and be succedd to totally removing Ubuntu, installing Lubuntu instead of it.

Thanks for @ciampix and @guiverc for their comments.


Look like I meet same problem. again.

PULSE_LATENCY_MSEC=60 and tsched=0 won't help.

In google hard and found advice

Seting in /etc/pulse/daemon.conf

resample-method = speex-float-10

Surprisingly solve problem.

Lover quality resampling, like speex-float-8 don't remove crackling complete.

UPD:

Later I found above lover crackling but wont eliminate it completly.

Another cause discussed in Arch wiki related to snd-hda-intel module, in my case ALC887, force me search for snd-hda-intel parameters.
And found solution bdl_pos_adj: set IRQ timing workaround for hda-intel

Crackling fixed by applying module parameters in /etc/modprobe.d/sound.conf

options snd_hda_intel vid=8086 pid=1e20 bdl_pos_adj=16,16

vid=8086 pid=1e20 is PCI id of my audio device Realtek® ALC887
bdl_pos_adj value choosen by experiment

bdl_pos_adj=2,2 keep crackling
bdl_pos_adj=1,48 make ugly skips
bdl_pos_adj=16,16 sounds acceptable

UPD2:

Now I changed to bdl_pos_adj=-1,32

There first number os device number and -1 mean all

I think, in future, avoid using ALC887 as it cracling not only in skype but also in Adacity.


Rename multiple directories in the command line

prename

Simplest way would be to use rename or prename, which is a Perl script ( if you're a ksh or mksh user, that shell has rename built-in function, which is different, so for the sake of consistency, I'll use prename when referring to that Perl script; alternatively you could call /usr/bin/rename - full path to the executable).

$ ls
Session 1/  Session 2/  Session 3/  Session 4/  Session 5/  Session 6/  Session 7/  Session 8/
$ prename 's/Session/Folder/' Session*/
$ ls
Folder 1/  Folder 2/  Folder 3/  Folder 4/  Folder 5/  Folder 6/  Folder 7/  Folder 8/

If you need recursive search or ensure that you find the right type of item ( maybe you also have files with word "Session" in the filename) you can combine that with find utility:

$ ls
Folder 1/  Folder 2/  Folder 3/  Folder 4/  Folder 5/  Folder 6/  Folder 7/  Folder 8/

$ find -maxdepth 1 -type d -name "Session *" -exec prename 's/Session/Folder/' {} \;

$ ls
Folder 1/  Folder 2/  Folder 3/  Folder 4/  Folder 5/  Folder 6/  Folder 7/  Folder 8/

Slightly lengthy, maybe slightly redundant, but works.

mv

The small problem with mv is that we need to alter the name of the destination each time, so by itself it can't do what we want. To do that, we'd have to combine it with some other tools, such as find or bash's tools.

$ ls
Session 1/  Session 2/  Session 3/  Session 4/  Session 5/  Session 6/  Session 7/  Session 8/

$ for dir in Session*/ ; do mv "${dir}" "Folder ${dir##*\ }" ;done

$ ls
Folder 1/  Folder 2/  Folder 3/  Folder 4/  Folder 5/  Folder 6/  Folder 7/  Folder 8/

What you see here is that we're looping over all items that contain the word Session in them and are directory. We use parameter expansion `${dir##*\ }" to extract everything after space in directory's name ( which is the respective number), and form new string "Folder /".

In both prename commands and mv we're using globbing, which means these approaches will rename every directory that contains the word "Session" in them, even "Session blah". Not ideal, of course, but for the specific case where you know your folder naming is consistent, that'll work. Alternatively, we could augment the command with for dir in Session\ [1-9] ; do . . .done.

In other words,this approach can work, but is very simplistic and isn't the best.

Python

Of course, other tools can be used as well. For instance, Python:

$ ls
Session 1/  Session 3/  Session 5/  Session 7/
Session 2/  Session 4/  Session 6/  Session 8/

$ python -c 'import os,shutil;map(lambda x:shutil.move(x,x.replace("Session","Folder")),os.listdir("."))'

$ ls
Folder 1/  Folder 2/  Folder 3/  Folder 4/  Folder 5/  Folder 6/  Folder 7/  Folder 8/


Server name resolution messed up when running PiHole in Docker

I had the same problem.

I have my routers DHCP point all devices on the network to use my PiHole as DNS.
The PiHole lives in a Docker container on one of the machines running Ubuntu 18.10 on the network.

I have had to have that machine ignore the DNS coming from the DHCP and instead have the Ubuntu machine use the name servers of my ISP (below I will use 1.1.1.1 and 8.8.8.8 just as an example).

I am running NetworkManager, so have had to change /etc/NetworkManager/NetworkManager.conf by setting dns=none under [main].

For the part of ignoring the DHCP given name servers, change: /etc/dhcp/dhclient.conf and add:

supersede domain-name-servers 1.1.1.1, 8.8.8.8;

Furthermore, I've updated /etc/resolvconf/resolvconf.d/base by setting nameserver 1.1.1.1

I also stopped and disabled dnsmsq to avoid any conflict on port 53 when I start Pi-hole running:
sudo systemctl stop dnsmasq and sudo systemctl disable dnsmasq

Last, but not least, make sure that you start your Pi-hole container with arguments for DNS, the name servers to forward to, (environment variables DNS1 and DNS2) as well as setting the IP of the container (otherwise it will try to bind to 127.0.0.1:53) by specifying:

-p 192.168.1.10:53:53/tcp -p 192.168.1.10:53:53/udp

if 192.168.1.10 is the IP of the machine running the Pi-hole container.

Hope something here helped.


How to shutdown the computer after Xsession ends?

The syntax for shutdown from command line is

sudo shutdown -P now ## for system POWEROFF
sudo shutdown -h now ## for system HALT or POWEROFF

If that did not work we can also perform a forced poweroff

sudo poweroff --force

In case we start the script from a user session (as was the case in a custom session) we can either allow users to shutdown without root privileges (don't use sudo in your script then!) or follow answers to below questions to shutdown without root privileges from a user session:

Shutdown from terminal without entering password?
How can I make shutdown not require admin password?


libreoffice base - cli insertion of records?

The easiest way to manipulate a HSQLDB database by means of scripts would be to use the tool sqltool provided in the package. You can do things like:

hsqldb-sqltool urlid --SQL="SQL statement 1; SQL statement 2; ..."

(where urlid is a file containing connection details), or read a bunch of SQL statements from a file, like this:

hsqldb-sqltool urlid file1.sql

NB: As @tohuwawohu points out, the database needs to be set up as a server to access it this way, rather than as "embedded", which is the first thing LibreOffice Base offers.


is there a way to restart ubuntu through shell into specific compiled kernel?

You can set the GRUB_DEFAULT variable in /etc/default/grub. Then run update-grub2 and reboot.

For example use the second entry as default (they are starting at 0):

#!/bin/bash

sed -i 's/^GRUB_DEFAULT=.*/GRUB_DEFAULT=1/' /etc/default/grub
update-grub2
reboot

This script needs to run as root.

For users from other Linux distributions: The commands above may vary on your system. It has been tested only on Ubuntu. (However, the question is tagged as Ubuntu)


LibreOffice doesn't show 'Display'-mode Word equations correctly; is there a Linux word processor which can?

When a formula is inserted in LibreOffice, it gets anchored As Character by default.

This means that it behaves the same as characters do.  So we treat it the same way as if we had three characters, for example "abc" instead of three equations.

Format -> Align -> Center
Move the cursor after the first equation and press Enter.
Repeat step 2 for the second equation.

Now, all three equations are centered and on separate lines.

Here is the result of these instructions for the "abc" example, showing that formulas behave the same as characters.  (Pressing Enter auto-corrected to upper case "A").

To make this work in both MS Word and LibreOffice, perhaps use the Inline setting only.  However, I do not have a copy of MS Word to verify this, and Word Online cannot edit formulas (but can display them if that is all you need).

Is there an alternative word processor which uses the Display formula setting as MS Word does?  Quite possibly; there are a number of alternatives either paid or free.  Whatever alternative you choose, though, there will be incompatibilities of some kind.


Select device boot installation for installing Ubuntu dual boot with Windows 10

To answer you question, selecting the entire ssd will work, but having the bootloader in a separate drive can cause issues.
So as a safer alternative what you can do is make a new EFI partition and install the bootloader in it.
Boot into installation media. (make sure it is the EFI version. You should see "Install alongside Windows" option when selecting installation type...)
During installation select "Something Else" option. Not "Alongside Windows".

1st Partition / EFI (For separate EFI partition.)

Select your HDD.

Delete any partitions you don't want

Select the "free space".

Select "+"

Partition the target drive as follows:

Size: 250-500MB
Type for the new partition: Primary
Location for the new partition: Beginning of this space
Use as: EFI (this will be listed as /dev/sda2 efi in the partitioning tool once you create it if you freed up space like in your photo)

2nd Partition / Root (All the software you install are stored here)

Select "free space" under your HDD.

Select "+"

Partition the target drive as follows:

Size: min. 10 GB (25+GB recommended. I have 40GB. If you want everything to be in one partition, make this to take up all the space.)

Type for the new partition: Primary
Location for the new partition: Beginning of this space
Use as: ext4
Mount point: Choose "/"

3rd Partition / Swap (Only needed if you want to Hybernate)

Select "free space" under your target drive.

Select "+"

Partition the target drive as follows:

Size: Depends on your RAM. See Swap FAQ.
Type for the new partition: Primary
Location for the new partition: Beginning of this space
Use as: swap

4th Partition / Home (Only needed if you want to keep your personal files separate from / Root partition)

Select "free space" under your target drive.

Select "+"

Partition the target drive as follows:

Size: Remainder of space on the drive or any size you want.
Type for the new partition: Primary
Location for the new partition: Beginning of this space
Use as: ext4
Mount point: Choose "/home"

Boot loader Device

BEFORE clicking "Install Now", from the "device for boot loader installation" option button, select the 250MB - 500MB EFI partition you just created as the target for the bootloader. (probably **/dev/sda2).
Click "Install Now".

Installation & Reboot

Finish the installation process and reboot (removing the USB stick when your UEFI/BIOS screen logo appears).

Upon reboot
After UEFI/BIOS reads the new bootloader entry that Linux has added to it, you will be presented with the grub menu with a listing of your Linux distro as well as a listing to boot Windows 10.

Boot into Ubuntu

Install any updates and then reboot and attempt to enter Windows 10 from the grub menu to make sure that grub correctly handles the hand-off to the Windows 10 bootloader.

What you have done:
You have installed the Linux EFI bootloader to the newly created EFI partition. In the process of this, Linux has added an entry to your UEFI listings in your systems UEFI/BIOS. Linux has also automatically detected your Windows 10 install and added a grub menu item to boot it. Your computer at this point will now automatically boot to Linux unless you choose to boot to Windows (from the Grub menu). You can make it boot straight into Windows by moving "Windows Boot Manager" above "Ubuntu" in the boot sequence in firmware settings (You will not see grub when you do this and you will only be able to boot into Ubuntu again through boot options (Usually F12 during boot) or by moving Ubuntu up in boot sequence again).
What you have not done:
You have not in any way altered your Windows 10 install or its bootloader or even so much as touched the Windows 10 EFI partition. Everything is reversible simply by removing the Linux UEFI listing from your UEFI/BIOS settings. How to do so varies from each vendor.


Download the Boot Repair iso file.
Make a bootable Boot Repair live USB flash drive with Rufus or UNetbootin. If you have a Debian-based distribution handy you can also use Startup Disk Creator to make a bootable Boot Repair live USB flash drive.
Boot from the Ubuntu USB flash drive and install the OS until you get to this error message.

The 'grub-efi-amd-64-signed' package failed to install into /target/.
Without the GRUB boot loader, the installed system will not boot

Continue the installation anyway until it finishes.
Reboot the computer with the bootable Boot Repair live USB flash drive selected as the first entry in the boot priority menu of the UEFI/BIOS.
Click the Recommended repair button in the Boot Repair menu and run it. You don't need to click any of the Advanced options.
Reboot to the Ubuntu installer from the Ubuntu USB installation media.
At the Installation type screen select the Replace ... with Ubuntu option where ... is whatever Linux you installed the last time. The Ubuntu installer may identify this Linux as "generic Linux" instead of Ubuntu because it has a different bootloader which was installed there by Boot Repair. This time the installer will run all the way through until the end and replace the grub that Boot Repair installed with the appropriate grub for Ubuntu.

Converting Ubuntu into UEFI mode

Start Boot-Repair, and select Advanced options -> GRUB location tab.
If you do not see a Separate /boot/efi partition option, this means that your PC does not have any UEFI partition.
If you see a Separate /boot/efi partition option, put a checkmark in the checkbox to the left of it, then click the Apply button in the lower right corner.

Set up your BIOS so that it boots the hard drive in UEFI mode. The way to adjust this setting depends on the specific model of the computer, but generally this setting is located in the boot priority settings under the Boot tab of the BIOS/UEFI setup utility.

For more information about converting Ubuntu into UEFI mode review https://help.ubuntu.com/community/UEFI in the section about Converting Ubuntu into UEFI mode.


It's a bug in mtools and a patch was offered earlier this month.

The bug entry mentions a partial workaround (pad it out with underscores until you hit the label length limit and the nA is pushed off the end).

Another I have is to add a space to the end of your desired label (eg. "DOCUMENTS "). Then you get " A" rather than "nA", which can then often be made to look intentional.


I just upgraded to 17.10 from 17.04: library not found for gedit

It looks like themeshlab-mardy snap has a version of libstdc++ in it, which is incompatible with the version in 17.10 which the system libmirclient is linked to, and is being used for some reason. This should be reported to the owner of the snap as a bug.

If you remove the meshlab-mardy then gedit should work again.


Auto Start Firefox and Launch a URL by Default in Lubuntu 14.04

You can also use Upstart:

Create a file $HOME/.config/upstart/firefox-with-url.conf

Content:

start on desktop-start
stop on desktop-end

exec firefox <url>

More info:

http://ifdeflinux.blogspot.de/2013/04/upstart-user-sessions-in-ubuntu-raring.html

http://upstart.ubuntu.com/


Create a file with root access and make it executable?

To create the two files listed in your link.

sudo touch /etc/pm/sleep.d/20_docky
sudo touch /etc/pm/power.d/20_docky

Make a file executable open Terminal, Crl-Alt-T

sudo chmod ugo+x /etc/pm/power.d/20_docky
sudo chmod ugo+x /etc/pm/power.d/20_docky

This command will make it executable for everyone.  u=user, o=owner, g=group.

Other options r=read w=write.  For complete information from Terminal enter

man chmod

Having created the file and changed to executable, copy the code blocks from your link and hopefully, all will go well.

To run the two scripts, the easiest way is the open the two files created in with gedit

sudo gedit /etc/pm/power.d/20_docky

The copy the script from your link and paste into the open file.  Save the file and exit.

sudo gedit /etc/pm/power.d/20_docky

Copy the text for this file from your link, save and exit.

Then reboot and see if it is working.


I managed to add an extended menu somehow Probably by following this guide
but feel free to report it as a bug to ubuntu if you think it is a usability issue. I think the correct category would be indicator-me


I too had trouble finding the received file. I changed the settings so that all received files should be stored in a specific directory (e.g. ~/Downloads/Bluetooth Incoming"). Ubuntu will prompt to accept/reject the incoming file. After I click on the accept button it shows the progress on the Bluetooth Manager that it is receiving the file but it does not store the received file on the specified directory. It turns out it stores the received files in ~/.cache/obexd/ directory


How to resolve bootloader problem in Ubuntu 13.04?

I could suggest you remove Lubuntu and use Boot-Repair to restore GRUB.


For 2.0 GHz Dual-Core processor, let us consider:

Intel® Pentium® Processor E2180

According to CPUBenchMark, the scores for

Intel® Pentium® Processor E2180 is 1086.
Intel® I3® Processor 4030U is 2684.

Now, these results here are NOT absolute and for reference only because the hardware varies for each individual.

But the point is, Ubuntu takes into consideration the minimum of the specified processor and publishes the requirement on their website. So, accordingly your hardware is OK for an Ubuntu installation. But if you are conscious, you can use a minimal DE such as Lubuntu or Xubuntu. Also, the softwares you are requesting WILL run in your machine but the performance cannot be guaranteed as it may also vary for each individual.


Looking for real time voice changer through Linux?

Install some packages:

sudo apt install pavucontrol libsox-fmt-pulse sox

Check your voice in normal mode by loading module-loopback:

pactl load-module module-loopback latency_msec=100

Unload module-loopback to stop listening your voice:

pactl unload-module module-loopback

Use the next command to change your voice in real time and listen to it:

sox -d -d pitch -700 contrast 100 echo 0.9 0.9 5 0.6

Change pitch, contrast and echo settings the way you like. And then you could use these settings in some programs like skype selecting them on pavucontrol's Recording tab:

pactl load-module module-null-sink
sox -t pulseaudio default -t pulseaudio null pitch -700 contrast 100 echo 0.9 0.9 5 0.6
pavucontrol

Reference


You need to open your context as a core profile, not a compatability profile.

The Mesa Open Source driver base only does not support GL_EXT_gpu_shader4 in compatibility profiles, only in core profiles.

Please refer to the Mesa3D website for more info:
http://www.mesa3d.org


Try to configure wine from playonlinux, go to settings+Wine+configure wine+ change windows version to windows 7


Type in a terminal:

sudo apt-get install b43-fwcutter

Under the desktop menu System > Administration > Hardware/Additional Drivers, the b43 drivers can be activated for use.

Restart.

Edited:

Install dkms.deb, patch.deb, fakeroot, and bcmwli. Those packages are in Ubuntu installation CD in the following paths:

/pool/main/d/dkms.deb
/pool/main/p/patch.deb
/pool/main/f/fakeroot
/pool/restricted/b/bcmwli

Enable STA driver in additional driver.

sudo modprobe -r b43 ssb wl
sudo modprobe wl


How to Install google-talkplugin deb in Ubuntu 16.04

I was able to install the plug-in using the command line like this:

sudo dpkg -i google-talkplugin_current_amd64.deb

That produced this:

Selecting previously unselected package google-talkplugin.
(Reading database ... 196768 files and directories currently installed.)
Preparing to unpack google-talkplugin_current_amd64.deb ...
Unpacking google-talkplugin (5.41.0.0-1) ...
Setting up google-talkplugin (5.41.0.0-1) ...

After this, I restarted Firefox. I went to Gmail to make a phone call, and after clicking the "Allow" button (prompted at the top of Firefox -- under the address bar), it worked.

However, after installing this, I was no longer able to sudo apt-get update

sudo apt-get update
W: http://dl.google.com/linux/talkplugin/deb/dists/stable/Release.gpg: Signature by key ***************omitted****************** uses weak digest
algorithm (SHA1)
E: Failed to fetch http://dl.google.com/linux/talkplugin/deb/dists/stable/Release  No Hash entry in Release file /var/lib/apt/lists/partial/dl.google.com_linux_talkplugin_deb_dists_stable_Release which is considered strong enough for security purposes

For now, I've disabled that repository by un-checking this:

The above step is my weak workaround for this bug:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1562733

Someone told me that I could just ignore that error until the repository is fixed (instead of disabling it, like above). However, I did not find this to be the case; it seems that if there is one failure during a sudo apt-get update, succeeding repositories (after that error -- ones without issues) do not get hit (therefore it ultimately blocks your ability to fully update your computer).

If I understand the bug correctly, it seems like Google will need to fix their repository to adhere to Debian/Ubuntu's (new) higher security requirements for signing packages.

To encourage Google to fix this, see here:
https://wiki.debian.org/Teams/Apt/Sha1Removal


I tried to install the .deb file through terminal and not using the Gdebi Package Installer and it didn't crash. Everything worked just fine! Thanks for your answers anyway :)


'Root Disk does Not exist' - How do I get it back?

From WubiGuide: https://wiki.ubuntu.com/WubiGuide/#Cannot_boot_into_Ubuntu

Never try to correct Wubi boot problems by reinstalling Grub2. This will prevent Windows from booting and will not fix the Wubi install.

Ubuntu cannot be booted if Windows has not been shut down cleanly, you have to clear the Windows filesystem from Windows (there is no chkdsk equivalent for Linux yet).

If Wubi fails to start,

boot into Windows
run chkdsk /r from Windows on the same drive where you installed
Ubuntu
shutdown cleanly and then try to boot into Ubuntu again.

Note that sometimes files are moved by Windows into a hidden folder called C:\found.000.

You need to have C:\ubuntu\disks\root.disk. If you do not see this file, look for found.000. You need to change the Windows Explorer settings to be able to see hidden folders first, then move the files from found.000 to their original location. Sometimes the entire \ubuntu\disks directory may be recovered to \found.000 in a folder named dir0000.chk.

The data from Wubi installation cannot be recovered by booting Ubuntu from USB. This is because Wubi does not create separate partitions for Ubuntu, but keeps everything in a big file C:\ubuntu\disks\root.disk inside the Windows partition. If this file is damaged, or deleted, recovery depends on repairing or undeleting the damaged file using Windows tools.

Hope this helps.


To find package installation defaults:

dpkg -L <package_name>

--Snippet Example:

dpkg -L firefox
/.
/usr
/usr/lib
/usr/lib/firefox-addons
/usr/lib/firefox-addons/extensions
/usr/lib/firefox-addons/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}
/usr/lib/firefox-addons/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/install.rdf
/usr/lib/firefox-addons/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/icon.png
/usr/lib/firefox-addons/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/preview.png
/usr/lib/firefox-addons/plugins
/usr/lib/firefox-addons/searchplugins


Gelemental is just the app for you! Install it with:

sudo apt-get install gelemental

It shows all the information you requested and so much more! Take Cadmium for instance:


Restart your computer, in grub select recovery mode then select root. After that mount your partition with write permissions using mount -o rw,remount / then do passwd {username of which user you want to change password } and reset your passwords on the users you want.


Unknown Error:''("The cache has no Package named 'steam')

To fix the problem just run:

sudo apt-get install --reinstall steam

The package is only about 800 kB.


Tor browser installation hangs on verifying signature

The thing that hangs is gpg. Run ps -ef | grep gpg while tor is verifying signatures and see there's actually a gpg running.
Tor browser installer will run gpg --refresh-keys anyways, so (from here)

  Because of some jerk on the internet poisoning PGP keys, downloading and using the TB developers' poisoned key will take forever

But we don't need to follow the link to cure the gpg db, as it has another home directory. We just need to download and install the 'poisoned' key safely.
This thing is implemented in gpg 2.2.17 and later versions. So you need to /usr/bin/gpg --version and update gpg if it's older than 2.2.17.
The update process is rather simple, too: get to this git gist, load the script, replace 2.2.10 with 2.2.17 within the script and run download, compilation and make.
Maybe you should copy /usr/local/bin/gpg* over /usr/bin/gpg* after it.
Enjoy )

gpg (GnuPG) 2.2.17
libgcrypt 1.8.3
Copyright (C) 2019 Free Software Foundation, Inc.


You might have deleted your android sdk

To fix:

sudo su

To get root^

apt-get install nano -y --force-yes
cd /home/robert/
nano .profile

Remove (or put a hash before) line 4 (You can check the line count by Ctrl+C or go to a specific line with Alt+G)


External HDD error - data recovery Ubuntu 12.04

Since you are getting an input/output error I would not suspect filesystem corruption right away(though its possible). First I would try a different cable. With the new cable try every USB port on both machines.

Does the OS even recognize when the HDD is first plugged in? If you can get the OS to recognize the HDD maybe it would be possible to use a cloning utility to clone the drive to another external HDD.


Install Ubuntu side by side with Windows 7 on existing RAID 5 array

Most "RAID BIOS" built into motherboards are actually a software RAID, not a true hardware RAID, which is why Ubuntu doesn't see it.

What I would try to do is backup your RAID setup, all your data, etc. Then try re-creating the RAID setup with Ubuntu using mdadmin.

By this I don't mean start over, but setup mdadmin to replicate your existing raid setup, and install Ubuntu on that other partition you want to create. It might be possible that setting up the Linux software RAID to mimic the "BIOS RAID", you can actually use both windows and Linux on this RAID setup.

If you want a solution that is really going to work, you need to buy a real hardware RAID card, they're normally $200+.


Can I install Microsoft Visual Studio on my Ubuntu machine?

You don't need Visual Studio to access MS SQL Server. If you're developing an application (as mentioning Visual Studio would imply), you need some library for your language of choice which would allow you to connect to the server.

What is the language you're using?

For example, for Python there's pymssql

There's also FreeTDS, which, as I understand, is a set of command-line tools and libraries to connect to MSSQL and Sybase servers.

At any rate, I think it would be very difficult to install Visual Studio in Ubuntu (well, apart from installing it inside a VirtualBox instance running Windows).


What happens to downloaded files if a package install through pip fails midway after downloading a few files due to some reason?

I can answer for apt-get. From man apt-get:

clean
    clean clears out the local repository of retrieved package files.
    It removes everything but the lock file from
    /var/cache/apt/archives/ and /var/cache/apt/archives/partial/.

--- *snip* ---

/var/cache/apt/archives/
    Storage area for retrieved package files. Configuration Item:
    Dir::Cache::Archives.

/var/cache/apt/archives/partial/
    Storage area for package files in transit. Configuration Item:
    Dir::Cache::Archives (partial will be implicitly appended)

Thus, partially downloaded files through apt-get reside in /var/cache/apt/archives/partial and can be removed with the clean operation.


Well I just found out why USB booting doesn't work and you can make it work but then it causes many limitations that are just a major annoyance.
link to the website

You must open the case and remove a write-protect screw.
You must use a USB flash drive as the main storage device. The internal SSD will be useless.
You cannot boot to ChromeOS anymore.
You must use modified firmware designed for a different device, which has a chance of failing and rendering your Chromebook unbootable.
You cannot use Ubuntu 14.04 LTS, because the trackpad won't work. You must use the latest version, 15.04, which will only be supported for nine months, and keep updating to later versions frequently.

(List provided from website linked above)


Installation and configuration of an SNMP client

As suggested, you should use snmpwalk or snmpget in a script.
The package containing snmpwalk and snmpget is "snmp" and the correct syntax for install is:

sudo apt-get install snmp

instead of "get-apt install snmp snmpd mbrowse"

After install, you can do a complete snmpwalk to discover wich of the informations you need from your cisco device and later filter them using snmpwalk otions.

Example:

snmpget -v1 -c public 192.168.0.254 .1.3.6.1.4.1.11.2.14.11.5.1.1.2

Hope this helps!


So thanks for all the above help.

For future readers looking to migrate their files from a Mac OSX to Ubuntu I can confirm that using an ethernet/crossover cable and setting up a direct link between the two is the easiest (in my experience) in terms of speed and ease. I've done in one evening what would have taken a week and an enormous amount of headache in terms of file size, external HDD format etc using an external HDD. No problem with permissions. Blisteringly fast transfer rates. Uses the samba file sharing protocol.

Instructions on how to connect a Macbook Pro and a device running Ubuntu can be found here
http://wwharticles.blogspot.co.uk/2012/07/how-to-connect-mac-to-ubuntu-pc-using.html

I used a crossover cable but apparently this isn't necessary for a Mac anyway as it can reverse lead polarities so a standard ethernet cable should work fine.

I can't recommend this enough for those looking to migrate from Mac OSX to Ubuntu (or just transfer large files).


I've experienced this problem several times and I don't know what's causing it... Restarting X may be a fix, but I'm not sure it's the best one ;)


On Kubuntu how can I keep wifi connected when my laptop is closed?

Disable lid close actions in all of the power management profiles:

System Settings > Hardware > Power Management > Energy Saving

and, in each tab, under "Button events handling" set "When laptop lid closed" to "Do nothing".


It works fine for me. :)
Please note that you need to put it in evdev.xml as a variant of the Russian layout, i.e. somewhere below this part:
    <layout>
      <configItem>
        <name>ru</name>
        <!-- Keyboard indicator for Russian layouts -->
        <shortDescription>ru</shortDescription>
        <description>Russian</description>
        <languageList>
          <iso639Id>rus</iso639Id>
        </languageList>
      </configItem>
      <variantList>


Which program to use for viewing mulitplex jpg and mp4 360x360 photosphere files?

FSPViewer is a free viewer for spherical panoramic images, very simple, but fast even with large HiRes files.


How can I allocate space on my hard drive for ubuntu install?

I assume you still have windows on it. resizing windows partitions is best done from within windows.

go to the control panel --> administrative tools ---> drive management

there you can shrink your partition enough to put ubuntu on the freed space


Commands for Installing Unity on Ubuntu Minimal Desktop

This answer is for older (before 17.10) versions of Ubuntu. See the answer by Gravity10 for later versions.

This will give you a more "minimal" install. apt-get default behaviour is to install all recommended packages.
sudo apt-get install --no-install-recommends ubuntu-desktop


HP 6735s Brightness hotkey problem; where is brightness panel?

12.04 (precise) on HP 6735s

I had the same problem - this is how I resolved it.

I flashed the bios - now the brightness buttons work.

Just a word of warning, the sound-mute button stopped working....sigh...oh well, you can't have it all :)


I had the same problem. The terminal did not show up in the Laucher or when using Alt+Tab. This was after migrating my Ubuntu 12.04 installation to a new laptop.

Solution: Uninstall gnome-terminal using Ubuntu software center and re-install it right afterwards.


why do I not see desktop cube option in compiz manager

I think  you need to install synaptic manager for extra plugin options like cube on desktop features in compiz config manager.


How do I configure a local directory in a wine launcher?

Got it working with this:

[Desktop Entry]
Name=UMC
Type=Application
Terminal=true
Exec=wine ./data/Python/x86/python.exe loader.py 'x86'
StartupNotify=true
#Icon= ./data/UMC.ico #this one doesn't work

I recently stumbled across a Ubuntu Forums thread which mentioned this.

On the note that I DO have it working, I'm not sure if XFCE might be lending a hand here.
So if this doesn't work for you, check your Desktop Environment and/or Window Manager.


Firefox, touchpad middle-button, open in new tab, lenovo T60

I'm sorry, but while experimenting, I found it to be my own fault: I asked myself

"what does the middle button do at all, if not opening a new tab?" and the surprising answer was: Nothing at all.
But why does pasting maked text work? Because I have a different hit technik for that cases: Shorter and harder clicks.

Seems to be a hardware problem. If I hit the button hard and short enough, it opens links in new tabs. I'm sorry and provide a self-answer, if maybe this hardware problem is not too rare. Since refurbished Thinkpads are quite common, it might be helpful for others.


You can toggle smoothly between two keyboard layouts with the help of some combination of keyboard keys:

Key for go forward in layout list => Super+Space.
Key for go backward in layout list => Shift+Super+Space.

If this don't work, check the following setting. If it's not setup, then set this according to the following steps:

Open the Activities overview and start typing Settings.
Click on Settings.
Click Region & Language in the sidebar to open the panel.
Click the + button in the Input Sources section, select the language which is associated with the layout, then select a layout and
press Add.

For more information you can take help of given link:
https://help.ubuntu.com/stable/ubuntu-help/keyboard-layouts.html.en


Can I keep applications open after last window is closed?

If you use the "nohup" (no hangup) command when starting the command, you may get the behavior you want.  see the man page,

 man nohup

Putting an "&" after the command will run it in the background, but closing the terminal is likely to end that command, since the closing window generates the "hangup" signal, which may be the problem you have been having.


Redmine (as posted by rob) might be better suited to your question (it uses mail) also have a look at gantproject and see if that is what you are looking for.

From their webite:

GanttProject is a cross-platform desktop tool for project
scheduling and management. It runs on Windows, Linux and MacOSX,
it is free and its code is opensource. What can it do?

Create work breakdown structure, draw dependencies,
define milestones.
Assign human resources to work on tasks,
see their allocation on the Resource Load chart.
Share projects with your colleagues using WebDAV.

and an image:


initramfs won't load radeon after blacklisting it in modprobe.d

I got kind of a workaround going:

I added "modprobe radeon" to my rc.local file. This will take place after a few seconds while I am at the login screen, resets X and switches from low resolution to the normal monitor one.
The only downside is, that it takes a few seconds to take place and it is recognized as a crash of X.org. Therefor I get an annoying apport pop-up window.

At least pci-stub binds correctly to the devices as both

dmesg | grep pci-stub

and

lshw -c video

show me.

I would still prefer a real solution, if there is any...


To use Windows network device drivers in Ubuntu, you might try ndiswrapper. This answer might help: How do I get drivers (especially WLAN/bluetooth) working on HP Envy dv6?


How do I manually add a printer, auto keeps detecting wrong printer

You can also run /usr/bin/system-config-printer without restarting Gnome.


Clion "Bundled Cmake does not work in this enviroment" ubuntu 14.04

to set the compiler used:

click the menu item 'project'

click the resulting pull down menu items 'properties'

in the resulting properties window

left column click c/c++ Build

in the resulting list click settings

in the third column enter the command for the desired compiler

in the second column click the desired compiler

in the resulting list click each entry and set the desired values

similar steps need to be performed for the desired linker


XAMPP via SSH: Accessing localhost on a remote machine

localhost means the same computer by definition. The correct way to address another computer is to use its network name like MyComputer or its IP address. So you should use http://MyComputer.

SSH is not related to HTTP connection, they are different application protocols. (There is a possibility to tunnel HTTP over SSH but it is absolutely not necessary for a local network.)


Using Ubuntu (Gnome-desktop) or Kubuntu (KDE-desktop) is in the end a choice of preference and maybe what applications you use more.

You can even install both, by making sure that both packages, ubuntu-desktop and kubuntu-desktop are installed. With this setup you can decide when you login, which desktop you want to use (or with the change user option have both desktops running at the same time).

if you want to have a better blend of GTK apps in KDE, you can select the Curve theme for them in the settings (I think it is in appearances in system-settings).

I do not think there is a real objective answer more than this for your question, and we do not want to start any flaming here :)


Which Ubuntu should i install in order to install latest LTS version?

Upgrade from one LTS version to another LTS version is supported. So installing 16.04 should be ok.


How can I change git history (git rebase -i) after I did a git push

You can edit history after a push, it's just not recommended. In fact, rebasing in general is not recommended.

git push -f will update the remote after a rewrite. If you have other people reading that source then doing a push -f after rewriting will mess up their repos.


Hang after update the software center in ubuntu 14.05

A couple of months ago, I tried installing Ubuntu 14.04 on my desktop machine. It ran really well until I installed a ton of recommended updates. Then, boot time was longer, and the system would hang all the time. The software center was almost unusable as well.

As for a solution, I would recommend using Linux Mint (which I installed instead of Ubuntu); its basically Ubuntu with a different desktop; I find it to work better. Or, you could try Ubuntu 12; I haven't tried it myself, but I have heard that its really good.

If you are determined to keep what you have now, try looking at the update history, and uninstalling whatever the update installed. This is not the best solution, so be very careful so you don't break your system.

Hope this helps!


Cannot restart Ubuntu after replacing Unity with Gnome and purging lightdm

I did some digging around on this site and found that I needed to type

dhclient eth0

to get Internet connectivity since I had wired Internet connection.  From there it was plain sailing.  Thank you Jcubed!


My uptime is now more than 23 hours and I have no UDP receive errors. I see that you are getting between 1-7 errors per second--a lot.

UDP packet receive errors probably represent something mangling the data in those packets. There's an optional checksum in UDP packets that are used to detect bad UDP packets.

Packet mangling could normally happen anywhere on the Internet, but DHCP packets should only be coming from your own LAN. On the other hand--that's a lot of errors to be coming only from DHCP. DHCP is only used when systems boot, and usually once every few hours per computer--not seven times a second. What else are you running on this server?

I would check the network connection for the computer in question, maybe swapping out the network adapter and the switch port to which it is probably connected to see if that helps.

Another thing to try is to use the combination of tcpdump and wireshark to identify what those bad packets are--something strange may be going on.


Convert all .ape files to .flac in different subfolders

The command that you need is:

find /path/to/MainDir/ -type f -name "*.ape"  -execdir sh -c ' avconv -i "$1" "${1%.ape}.flac" ' _ {} \;

This will find each file that has .ape suffix and then convert it with the same filename with .flac suffix to the same location as original file is located.

{} is the path of current found file.
See the test from here


Keyboard shortcut to move to next window

Not entirely sure whether I understood your question correct, but the key combination to switch to the next window is Alt+Tab+→. Perhaps you can bind your gesture to that key combination. (Previous window is Alt+Tab+←).


IcedTea plugin not working in Midori web browser

I have Lubuntu 13.04 running Oracle Java version 1.7.0_21 and Midori 0.4.3 is working fine to me.

I've just tested at the page:
http://www.java.com/en/download/testjava.jsp

Flash is working fine on Midori too. Flash version is 11.2.202.285.
I've just tested on YouTube.

I'm using Linux Kernel 3.8.0-23-generic (32-bit).

Are we using the same versions of Midori, Flash and Kernel?

Suggestion:
Install Oracle Java:

sudo add-apt-repository ppa:webupd8team/java

sudo apt-get update

sudo apt-get install oracle-java7-installer

You can keep IcedTea in case you prefer for some websites/apps. In order to change the java you'll use:

sudo update-alternatives --config java

sources:
http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html

If it does not work, pls, add more details such as:

what are the java websites that are not working on midori?
the same for Adobe Flash. pls?

Cheers,
Iberê


How do I transfer an installation from internal to external USB HDD

Boot to live cd.

Then:

sudo mount /dev/sdXY /mnt

Example:

sudo mount /dev/sda1

Note: If the user has a separate /boot partition, this must be mounted to /mnt/boot.

Note: If the user has a separate /home partition, this must be mounted to /mnt/home. Encrypted home partitions should work.

Run the grub-install command as described below. This will reinstall the GRUB 2 files on the mounted partition to the proper location and to the MBR of the designated device.

sudo grub-install --root-directory=/mnt /dev/sdX

Example:

sudo grub-install --root-directory=/mnt /dev/sda

Reboot

Refresh the GRUB 2 menu with sudo update-grub.


You can pin the version to Ubuntu groovy, it is explained here for Ubuntu hardy and intrepid, just replace hardy with focal (20.04) and intrepid with groovy (20.10).


Joining two text files with multiple keys

Using awk and sort:

awk -F, -v OFS=, '{x = $1 "," $2} FNR == NR {a[x] = $3; b[x] = 0; next} {b[x] = $3} !a[x] {a[x] = 0} END {for (i in a) print i, a[i], b[i]}' f1 f2 | sort -n

-F, -v OFS=, - set the input and output to be separated by ,
{x = $1 "," $2} save the first two fields separated by ,, since the combination is be the common index.
FNR == NR {a[x] = $3; b[x] = 0; next} - FNR is the record number per-file, and NR is the overall record number across files. These are equal for the first file, so this block is run only for the first file. Here, I save the third column of the the first file in the array a, and initialize corresponding entry in b to 0. And then I skip to the next record.
{b[x] = $3} !a[x] {a[x] = 0} - these two are run for the second file, saving the third column in b, and if there's no corresponding entry in a, set it to 0.
END {for (i in a) print i, a[i], b[i]}, at the end of both files, print every record obtained so far

Since looping over arrays in awk gives a random order, we need to sort the output at the end with sort -n:

$ awk -F, -v OFS=, '{x = $1 "," $2} FNR == NR {a[x] = $3; b[x] = 0; next} {b[x] = $3} !a[x] {a[x] = 0} END {for (i in a) print i, a[i], b[i]}' f1 f2 | sort -n
Storm_ID,Cell_ID,Wind_speed,Storm_surge
2,10236258,27,0
2,10236299,0,0.27
2,10236300,58,0.27
2,10236301,25,0.35
2,10240400,0,0.35
2,10240401,0,0.81
3,10240400,51,0
4,10240402,0,0.11


What does "exec 1>/var/opt/log/my_logs/MYPROG_`date '+%Y%m%d_%H%M%S'`.log 2>&1" do?

There's actually 4 important bits of information that are happening:

The exec built-in is used to redirect all output for command-line session to a file
The 1><FILENAME> tells the shell to redirect stdout standard stream, i.e. normal non-error output of commands will go to <FILENAME>. The > will create if <FILENAME> doesn't exist or truncate if <FILENAME> already exists.
The redirected filename is created via added backticks with date '+%Y%m%d_%H%M%S' command. Backticks are form of Command Substitution  and are functionally equivalent to $(date '+%Y%m%d_%H%M%S') form, and nowadays $(...) is preferred for readability and because this form can be easily nested (i.e., have multiple levels). So output of date with the specified format  '+%Y%m%d_%H%M%S' will create filename that is timestamped. If your command ran on 2018, July, 4th, 4:20:20 the output will be /var/opt/log/my_logs/MYPROG_20180704_042020.log.
2>&1 redirects stderr stream to that file also, it's a standard, POSIX compliant (which means Bourne-like shells other than bash understand it)form. This is functionally equivalent to &> bash-specific syntax. The order of specified redirections in shell is important, hence why this appears after 1> redirection.

In conclusion,  there should be no output from this command itself. It should only rewire two output streams of all successive commands to go into the file you specified.

Interestingly enough, with this command my bash 4.4 outputs everything to file, and that includes the prompt and anything I type (so here I had to type blindly echo hello world and hit Ctrl+D to exit afterwards):

$ bash --posix
bash-4.4$ exec 1>./mylog_`date '+%Y%m%d_%H%M%S'`.log 2>&1
$ cat ./mylog_20180424_010800.log
bash-4.4$ echo hello world
hello world
bash-4.4$ exit

Doing that piece by piece, reveals that bash outputs prompt to stderr stream and surprisingly along with anything I type:

bash-4.4$ exec 1> ./mylog.txt
bash-4.4$ echo Hello World
bash-4.4$ cat ./mylog.txt
cat: ./mylog.txt: input file is output file
bash-4.4$ exec 2>&1

In case of ksh same thing happens, but I can see what is being typed, only the prompt goes to file, i.e. stdin isn't redirected:

bash-4.4$ ksh
$ exec 1>./mylog 2>&1
echo hello askubuntu
bash-4.4$ cat ./mylog
$ hello askubuntu
$
bash-4.4$

So here we can kinda see that shells can choose to output the prompt PS1 also to one of the standard streams, so that gets included into a file.


A dedicated NTFS data partition in dual-boot - a better way to communicate data?

I also had the same issue but i am quite okay not to access the main Windows partition(C: or Windows recovery partition) from Linux. I keep my data which needs to be accessed from Linux in E:(data). Even if Linux is not going to harm anything...i prefer not to touch anything under c:\windows or anything under the Window Recovery partition.
Just my opinion and i don't have facts or reasons to answer your question 100%.


How to add wired connection to Network in 18.04?

I get this after running that command:

 # This file is generated from information provided by
 # the datasource.  Changes to it will not persist across an instance.
 # To disable cloud-init's network configuration capabilities, write a file
 # /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
 # network: {config: disabled} network:
     ethernets:
         enp2s0f0:
             addresses:
             - 192.168.1.10/24
             gateway4: 192.168.1.1
             nameservers:
                 addresses:
                 - 192.168.1.60
                 - 192.168.1.50
                 search: [example.com]
            optional: true
     version: 2


How to install Ubuntu touch on windows tablet?

Supported devices: https://devices.ubuntu-touch.io/
The installer: https://ubuntu-touch.io/get-ut


desktop has become a grey void in Xubuntu 13.10

do you have any conflicting Xorg packages? I had been using the oibaf PPA to get upstream Mesa stuff but they aren't building for Saucy yet so when I upgraded I had to manually go into synaptic and force the "older" versions of some of the packages which would've been installed with 13.10 by default to stop getting some graphical corruption.


The reason being bash's builtin echo (and also the external /bin/echo) by default does not understand backslash escapes (\), hence \t is being treated literally (instead of tab).

You need to use the -e option with bash's builtin echo.

From help echo:

-e     enable interpretation of backslash escapes

So in bash (or using /bin/echo) you need:

echo -e "\t$num * $i =$s"

On the other hand, sh's (dash) builtin echo by default interprets \t as tab, so you are getting  tab in case of sh.

To make it portable among all POSIX-compliant shells, use printf:

printf '\t%s * %s =%s\n' "$num" "$i" "$s"


How to config multiple monitor with optimus?

Solutions for the resolution is here
Scripts to auto set resolutions
and here
Xrandr ArchWiki usage
The code allows you to add and set a custom resolution for the specified monitor.


Add Windows to GRUB boot menu

Add Windows 10 to GRUB OS list

Boot Windows from grub rescue prompt

Boot Windows from grub rescue command prompt

Repair Windows MBR

This tutorial shows how to repair your Windows bootloader (MBR) from Ubuntu dual boot or Ubuntu live DVD/USB. This can be useful if you don't have a Windows DVD on hand.

Boot into your Ubuntu operating system. When you're in Ubuntu, open the terminal and follow the below steps.

Run this command to check your disk:

sudo fdisk -l

The output tells you the disk information:

Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x016c8108

Device Boot Start End Blocks Id System
/dev/sda1 * 63 39054014 19526976 7 HPFS/NTFS/exFAT

Now run these commands to install syslinux, which is a suite of lightweight IBM PC MBR bootloaders for starting up computers with the Linux kernel.

sudo apt update
sudo apt install syslinux

Once installed, you can fix your Windows bootloader by running the below command in the terminal:

sudo dd if=/usr/lib/syslinux/mbr/mbr.bin of=/dev/sda

Rescatux

Rescatux is a free bootable live CD/USB that can repair GRUB and the Windows bootloader. Rescatux has a graphical interface with a menu of operating system rescue tasks. If your hard disk has the MBR partitioning format, you can select the Restore Windows MBR (BETA) option to repair the Windows bootloader. If your computer has UEFI firmware, you can select among the UEFI boot options.

Boot options:

(>=0.41 beta 1) Update UEFI order
(>=0.41 beta 1) Create a new UEFI Boot entry
(>=0.41 beta 1) UEFI Partition Status
(>=0.41 beta 1) Fake Microsoft Windows UEFI
(>=0.41 beta 1) Hide Microsoft Windows UEFI
(>=0.41 beta 1) Reinstall Microsoft Windows EFI
(>=0.41 beta 1) Check UEFI Boot

GRUB options:

(>=0.40 beta 11) Easy GNU/Linux Boot Fix
Restore GRUB and GRUB2
(>=0.31 beta 4) Update any GRUB2 menu
Update Debian/Ubuntu GRUB menus

Windows options:

Restore Windows MBR (BETA)
Clear Windows passwords
(>=0.31 beta 4) Promote a Windows user to Administrator role
(>=0.41 beta 1) Reinstall Microsoft Windows EFI
(>=0.31 beta 4) Unlock Windows user

Password options:

Change GNU/Linux Password
Regenerate sudoers file
Clear Windows passwords

Expert tools:

Boot-Repair
GParted
OS-Uninstaller
Clean-Ubiquity
PhotoRec
TestDisk

Rescapp is a nice wizard that will guide you through your rescue tasks.

How to make a Rescatux live USB from Ubuntu

Insert a USB flash drive and check if the boot flag has been enabled on the flash drive using the GParted application. Unmount the USB flash drive. Open GParted and select the USB flash drive from the menu list of drives. From the GParted menu select: Partition -> Manage Flags -> check boot.
It is very important to verify that the device that you are installing the Rescatux live USB to is indeed your flash drive, so that you don't overwrite any of your system or personal files which may make your operating system unbootable. In Ubuntu you can find the device name of the flash drive using the Disks application.
Unmount the USB partition device. Let's say the USB partition device is /dev/sdc1

sudo umount /dev/sdc1 # replace sdc1 with the partition name of your USB drive

Change directories using cd to the path of the directory where the Rescatux iso file that you downloaded is located.
Write the Rescatux iso file to the USB flash drive. In the following command replace rescatux_0.xxxx.iso with the name of the Rescatux iso file you downloaded.

sudo dd if=rescatux_0.xxxx.iso of=/dev/sdc
sudo sync

I have also been able to make a Rescatux live USB using the built-in Startup Disk Creator app.


Xubuntu 19.04 not available as download for 32 bit PC's but upgrade option is visible from 18.10

The official website also says that starting Xubuntu 19.04 does not support 32-bit. I suggest you use the 18.04 LTS version.


Micromax mmx352g 3G USB modem not working in 12.10

I found a working solution.

open terminal
then type 'sudo su' (without inverted comma)
enter the password
then type echo 1C9E 9605 > /sys/bus/usb-serial/drivers/option1/new_id

wait for a minute (do not close the terminal while waiting)
and u should now see your default network


Saving output of a grep into a file with colors

To keep the markup, you need more than just a text file. I'd use HTML output to keep the colors.

Install aha i.e. to "converts ANSI escape sequences of a unix terminal to HTML code"

sudo apt-get install aha

then save your grep (or ls) output like this:

ls --color=always | aha --black --title 'ls-with-colors' > ls-with-colors.html

options:

--black param to set background as black color
--title param to set the title for HTML page

Syntax highlight for file extension via pygmentize

install pygmentize:

sudo apt-get install python-pygments

then run this kind of command:

pygmentize file.pl | grep -i --color=always version | aha --black > ls-with-colors.html


Install Lubuntu 16.04 on Sony Vaio PCG FRV35 (Laptop from 2003)

Your CD drive may just be dead. Older laptops can boot Ubuntu just fine (I'm pretty sure I put it on an old Dell Latitude from 2001). "Operating System not found" usually means there's either something wrong with the media or the drive.

Since you've confirmed that the drive is the issue and asked me to write an answer, I'm going to say it's that :p.

Hope you get everything working.


check the path to the icon /home/paul/scripts/wallch_tray.png


Installation Mythbuntu 11.10 on 64bit Toshiba Protege

User @Daffydack has answered in comments. OP's problem seems to be solved

  I use mythtv in regular ubuntu. You don't need the mythbuntu distro to use it. I can't say what the problem is with your particular installation, but why not try a regular ubuntu or its variants install and install mythtv that way.


Programs sometimes open on the wrong monitor

Funny that i can write an answer to my own question (even though i'm logged in) but wanted to say that zb's solution is good enough to do the trick :-)
Thanks

edit:
And now it seems i can mark my own answer as "accepted as answer"
i really don't understand this website at all. Sorry.. total newbie here


Is it possible to integrate Unity within Lubuntu Desktop Environment?

No. If you install the Ubuntu Desktop, you will have the choice at log in, of starting a Lubuntu session or a Unity session. I'm afraid you can't run Unity in a Lubuntu session. As for whether your drivers will break or not, will depend on your set-up.


how to transfer data between persistant live usb and computer

If there's still space in that usb stick, you could copy the data there. Usually with ubuntu live usb (I don't know with persistent mode) you can access the information in /cdrom directory which also have a link in /media/$USERNAME. Or else you could just connect another pen drive, an external hard disk, or maybe pass the information via ssh, upload it to a server, etc. You really have a lot of options.


How do I install proprietary drivers for my Brother all-in-one printer/scanner/fax?

For presently supported devices Brother provide an install script that both, downloads and installs all drivers needed to set up a network printer very quickly.

Set up the network connection

First set up your wireless connection on the printer display according to the quick setup manual. Note down your printer's IP as we need it later.

Install the proprietary drivers from Brother

Browse to Brother Support and search for your model number.
Search for Linux (deb) drivers:

In case we have a locale different from English we may have to ignore a warning to then select Language > English>
Download the Driver Install Tool only (no need to download the other drivers as the installer tool will do that for you).
Unpack the downloaded file and give it executable permission

cd ~/Downloads ## or the path you had stored the download
gunzip linux-brprinter-installer-2.0.0-1.gz
chmod +x linux-brprinter-installer-2.0.0-1

Run the installer script in a terminal with sudo:

sudo ./linux-brprinter-installer-2.0.0-1

We will be asked to proceed, accept licenses and we will need to answer several questions, e.g.:

Input model name -> type in the number of your printer (e.g. MFC-J5320DW)
Missing dependencies will be installed from the repositories
Will you specify the Device URI? [Y/n] -> Say Y if your printer was installed in the network (n for USB only).
Type in the number of your new printer's URI (e.g. 12 in the example below) from a list of all devices found

     ..
     12: dnssd://Brother%20MFC-J5320DW._ipp._tcp.local/
     ..

Choose to print an Ubuntu print test page with Y
enter IP address -> enter here the IP address of your printer noted above to enable network scanning.
Done!
Find uninstaller scripts in the download directory in case we need those later.

Find your new printer in the System Settings > Printers.

Optionally choose to make it your default printer, and adjust the default properties (e.g. paper size etc.).

Install the fax function if available.

Some Brother all-in-one printers also have an inbuilt fax but the drivers will not be shown on the printer driver download page.
Choose the general purpose Brother fax driver for any Brother fax model to download the LPR and CUPS wrapper drivers from their DEB package, e.g.:

brmfcfaxcups-1.0.0-1.i386.deb
brmfcfaxlpd-1.0.0-1.i386.deb

These drivers will likely also work with your printer's fax module by  adding a BRFAX-printer for sending a fax from any application.

Note in addition: Some devices will come with a maintenance web-interface we can reach simply by browsing to the printer's IP.


How can I save my laptops battery from draining?

Well for the brightness you should look here. You can't make Ubuntu remember your brightness settings but it will always boot with a predefined brightness level.

For the battery life you have to activate laptop-mode. It might not be active by default. To check on that here is a link to a complete walk through.

For the high performance and such power schema you can download Jupiter. You can copy and paste the following commands in a command line:

sudo add-apt-repository ppa:webupd8team/jupiter
sudo apt-get update
sudo apt-get install jupiter

EDIT: Also Web-E has a great point, you should check if you have two graphic cards (i.e. nVidia Optimus technology - most modern laptops have this technology). If you do, you can install Bumblebee and then you can run every graphic intensive application using the command optirun before it.


Can I make Tab auto-completion case-insensitive in Bash?

In order to make bash case-insensitive for to current user:

Run the following shell script in a terminal:

# If ~/.inputrc doesn't exist yet: First include the original /etc/inputrc
# so it won't get overriden
if [ ! -a ~/.inputrc ]; then echo '$include /etc/inputrc' > ~/.inputrc; fi

# Add shell-option to ~/.inputrc to enable case-insensitive tab completion
echo 'set completion-ignore-case On' >> ~/.inputrc

Start a new shell (reopen the terminal).

To Make the changes systemwide:

# add option to /etc/inputrc to enable case-insensitive tab completion for all users
echo 'set completion-ignore-case On' >> /etc/inputrc
# you may have to use this instead if you are not a superuser:
echo 'set completion-ignore-case On' | sudo tee -a /etc/inputrc

For details, see man bash . Yes it is a long page, but bash is a somewhat complex program, and if you want just search that page for "case-insensitive" to go to the relevant section. People usually learn bash one option at a time or one bash script at a time and it takes a long time to master all the nuances. Your interest may vary.


You can install .exe files using Wine.
Follow this, the great one place has full information about wine: How to install and configure Wine?


internet is not coming but skype is working

By looking at your comment you've said that you changed it to static via terminal. Assuming that; you've two ways where you can achieve which will be permanent even when you reboot the system.

First is via terminal by adding an additional line to specify DNS
Assigning manual IP's via GUI whilst setting the interface to default (reverting back network config)

Since you've used terminal, you may add below line to your /etc/network/interfaces file. Add it to the end of the file

dns-nameservers 127.0.0.1 8.8.8.8

You don't need to add your gateway as a DNS. You may add above two DNS with a space between the two. Also, below seen is a sample configuration of an interface.

auto eth0                                      # add this to auto up on boot
iface eth0 inet static
    address 192.x.x.x
    netmask 255.255.255.0
    gateway 192.x.x.x
    dns-search example.com                     # This is for windows AD environment
    dns-nameservers 127.0.0.1 8.8.8.8

As you can see, the attribute dns-search example.com is for Windows Active directory environment. You can remove that line.

Once done. Please restart you network interface using below command.

sudo /etc/init.d/networking restart

and then view the resolv.conf file with cat /etc/resolv.conf which should show the DNS configuration. You may also reboot and have a look through.

Hope this helps! :)