Making bash prompt bold My $PS1 variable is

\[\033[36m\][\[\033[m\]\[\033[34m\]\u@\h\[\033[m\] \[\033[32m\]\W\[\033[m\]\[\033[36m\]]\[\033[m\] $

I wish to maintain the same colors and text but make the prompt appear in bold. How do I accomplish this?

I looked over the web and found this can be done using tput bold, but the prompt appeared broken to me, I must be doing it wrong.

If you are using ubuntu 18.04, run the following commands

cp /etc/skel/.bashrc ~/.profile

That's it. You'll have a bold user@host at the prompt


Wine1.7 cannot be uninstalled completely I uninstalled Wine 1.7 by apt-get remove wine1.7. But I found the programs I installed in .wine can still run. How can I uninstall them?

Try

sudo apt-get install ppa-purge

sudo ppa-purge ppa:wine/wine-builds

Source:

http://linuxdaddy.com/blog/install-wine-1-9-on-ubuntu/

Open a terminal and type the following commands

sudo apt-get remove wine --purge

Next, we clean the context menu, menu entries, etc:

rm -rf $HOME/.wine
rm -f $HOME/.config/menus/applications-merged/*wine*
rm -rf $HOME/.local/share/applications/wine
rm -f $HOME/.local/share/desktop-directories/*wine*
rm -f $HOME/.local/share/icons/????_*.xpm
rm -f $HOME/.local/share/icons/*wine*

Now restart the system using:

sudo reboot


skype: error while loading shared libraries: libstdc++.so.6: wrong ELF class: ELFCLASS64 I have a problem with Skype on Kubuntu 14.04 x64. Skype does not start and throws

skype: error while loading shared libraries: libstdc++.so.6: wrong ELF class: ELFCLASS64

I have a backup of my system. When I do rollback then all works fine, but after some time past (1-2 weeks) Skype will not run with the message above.

How can I fix it?

I found a solution to my problem:

sudo apt-get install lib32stdc++6

This means that the library is 64 bit, which skype is not expecting. Possibly because you've installed 32-bit skype.
You can either try and get 64-bit skype, or install the 32 bit libraries:

sudo apt-get install ia32-libs


14.04 LTS No Dash / Launcher after update through Software Updater I'm getting no Dash / Launcher after I login. This started after an update through the Software updater. Please help to fix ... I've already lost a day trying different options posted on askubuntu.com. Nothing worked.

Got to the terminal via Ctl + Alt + F1 and logged-in successfully.

Here are the logs:
.xsession-errors
Script for ibus started at run_im.
init: unity-panel-service main process (2315) terminated with status 1
init: indicator-printers main process (2459) terminated with status 1
init: unity-settings-daemon main process (2300) terminated with status 1
init: upstart-dbus-session-bridge main process (2293) terminated with status 1
init: hud main process (2304) killed by TERM signal
init: indicator-bluetooth main process (2446) killed by TERM signal
init: indicator-power main process (2448) killed by TERM signal
init: indicator-datetime main process (2451) killed by TERM signal
init: indicator-sound main process (2453) killed by TERM signal
init: indicator-session main process (2483) killed by TERM signal
init: indicator-application main process (2486) killed by TERM signal
init: Disconnected from notified D-Bus bus

UPDATE (Jun 8, 2014):

Okay, I have reset unity, but I cannot login normally via the login screen.
Steps I follow:
1. Login screen -> blank ... No dash / no launcher / No Status (Notification) Bar on top
2. Ctrl+Alt+F1 to bash terminal
3. export DISPLAY=:0
4. unity-tweak-tool --reset-unity (This does not complete, blocks on OpenGL)
5. I anyways continue to by doing: Ctrl+Alt+F7.
6. Launcher & Dash look good. But there is (a) No Status / Notification Bar on top
7. Continuing to work this way. Haven't logged out since.

I had a similar problem, I solved it by switching in terminal (CTRL+ALT+F1) then removing the configuration file ~/.config/dconf/user like this :

(! this action will remove your gnome 3 settings !)

sudo service lightdm stop
rm ~/.config/dconf/user
sudo service lightdm start

CTRL-ALT-F1

mv -v ~/.gconf ~/.gconf-old

then
Code: [Select]

mv -v ~/.config/dconf ~/.config/dconf-old

then log off/on

Renames the conf files and makes some new ones.


Installing Ubuntu with the Windows installer? Is it safe as instructions said?
If I install Ubuntu by this way, could I while updating Ubuntu update grub?
because I saw this way install Ubuntu, when start Ubuntu is using Windows's boot manager.

You should know this about Wubi: Wubi - Pros and Cons...

Pros

If a computer needs to have Linux installed temporarily, Wubi is easier to remove without leaving obvious traces. Without Wubi, you need to re-enlarge the Windows partition and restore the Windows bootloader. With Wubi, you just use the supplied uninstaller. You can even temporarily hide the Ubuntu entry from the Windows bootloader.
For someone who wants to try out Linux but is afraid of harming Windows, Wubi is less scary.

Cons

Suppose a user has a computer with Wubi, has upgraded something but isn't sure what, is thousands of kilometers away, and phones you because his computer won't get past the bootloader stage. What next? There are far fewer resources about troubleshooting Wubi than with traditional Grub-based dual boot.
Similarly, if you need to troubleshooting or rescue the system with a live CD, Wubi reduces your options.
Increasing the size of the Wubi partition image wasn't supported last time I looked.
Wubi induces a small performance loss. (But if you're even considering Wubi, you probably don't care.)
If Windows screws up its filesystem, you lose Linux as well. (Though I get the feeling NTFS is reliable these days.)
Doesn't work with UEFI and if Windows 8 or above is preinstalled.

Related links:

Ubuntu Wiki: Wubi Guide
AskUbuntu post: Can I install Ubuntu inside Windows?
AskUbuntu post: How to boot WUBI installed Ubuntu within Windows 8?

Installing ubuntu on windows is safe. Get the installer by typing "wubi ubuntu".
After you follow the instructions, you'll have ubuntu and the original windows! Try it. It's free and safe.


Ubuntu 17.10 with LXDE locking leads to black/blank screen I recently upgraded to Ubuntu 17.10. As my laptop is rather on the weak side (performance wise), I grew quite uncomfortable with the new desktop as everything seemed to take longer, the laptop being slower overall.

So, I installed LXDE, lubuntu-session packages, etc., to make a transition to the more lightweight LX desktop environment. I am super happy about it, as the system now feels super fast and responsive.

One issue remains: If my session gets locked (by timeout, laptop lid close, or manual lock) I end up with a black and empty screen. Not even a mouse pointer, not responding to any clicks or simple key presses. The only remedy I found was killing/rebooting the entire machine.
After some playing around, I found that Ctrl+Alt+F1 takes me back to the login screen.

I tried to google for this problem, but didn't find any help: Several similar problems were discussed, like having no login screen right after boot (which is not my problem), of another solution talking about "Light Locker Settings" and turning off/on some stuff - but I don't seem to have this menu...

I do not really understand what's going on, and why I seem to end up at the wrong Ctrl-Alt-F* interface.

For me it's only a thing of minor to medium importance, as I found a way to work around it. But, of course, I would be glad if someone could point me to a clean solution.

(A solution is great, but if you could elaborate your answer a bit, I would be very grateful, as I'd really like to learn more about the inner workings of my system.)

Press Ctrl-Alt-F1 to go to a virtual terminal, and log in. Issue this command:

  ps ax | grep lock

If you see light-locker running, kill it

  killall light-locker

Return to your gui by pressing Ctrl-Alt-F7. Hopefully it is unlocked now.


Can I run Ubuntu 17.10 Alright, since Windows 10 is just FULL of spyware and I don't want to use it, can I run Ubuntu 17.10?
Specs:

OS: Windows 10 Enterprise 64-bit
CPU: Intel Pentium J3710 1.60 GHz (bios says its N3710 I don't know who to trust)
RAM:4GB DDR3 1599Mhz (11-11-11-28)
Motherboard: Acer Stego_BA (CHV)
GPU: Nvidia GeForce 920mx 2GB, and well, Intel HD
Hard Drive:931GB TOSHIBA MQ01ABD100 (SATA)

check Ubuntu Installation/SystemRequirements here:
https://help.ubuntu.com/community/Installation/SystemRequirements


Change default GRUB bootorder from windows I successfully installed a dual-boot (Ubuntu 18.04 and win10) on my notebook.

Unfortunately I'm still new to the Linux world and my terminal skills and Linux knowledge are close to bad. But I'm willing to learn.

My concern: Every time my machine restarts or I want to switch the OS I have to wait for the grub bootloader and then choose the OS. Normally I will not change my running OS for example if I worked in Ubuntu, I would like to boot back into it or the other way.

Now I want to write a little program that automatically changes the default boot entry to the other OS and then reboots the system.
I guess the problem is not writing this little script for Ubuntu. But how should I realize this for windows?

My To do list based on my knowledge.

Somehow move the /etc/default/grub file to a small fat32 partition so windows is able to read it and make changes.
~probably easy
Run the sudo update-grub equivalent command in windows? ~this one is way beyond my knowledge and maybe totally stupid - like running an file.exe on Ubuntu.

I already searched for similar question but without finding a reasonable good solution for me.

Some recommended to teach windows to read/write on the Ubuntu drive. I think that my precious Ubuntu drive should not be violated by windows.
Or to install another bootloader. I would like to stay with GRUB, because its working and the default?
Make changes to the /boot/grub/grub.cfg or /boot/grub/grubenv I'm not 100% sure about it, but most users don't recommend messing with the grub.cfg file because its generated from other files?

I know that I can probably just use a function in GRUB to run the last booted OS as default. But when I want to switch from one OS to the other I like the idea of just running a little own program instead of waiting for the reboot then hitting a key before the timer runs out... and if you miss this opportunity - reboot again -

Thanks for your help

This will do almost what you want...

Making this change will allow you to choose which OS to boot, and it'll reboot to that same OS until you make a different selection.

Edit /etc/default/grub and change/add this:

sudo -H gedit /etc/default/grub # edit the file

GRUB_DEFAULT=saved # change this line

GRUB_SAVEDEFAULT=true # add this line

Then:

sudo update-grub

For those of us on other flavors of Ubuntu, gedit may not be available; no matter, just about any text editor will do, and @heynnema has it right otherwise...
Edit the file /etc/default/grub with your favorite editor under sudo

Edit GRUB_DEFAULT to be "saved" (it probably is "0" when you see it first)
Add a new line "GRUB_SAVEDEFAULT=true"

Now

sudo update-grub


Remember Each Window/Browser size and location Ubuntu 14.04.1 LTS with latest Cinnamon updated.

Is there a way/software to remember the size and location of each window/application/browser that survives a reboot?
For example after logging in, I want to launch 2 terminals and a 3 browser windows on 2 monitors with specific size and locations.

Does something like this exist?
Any pointers would be appreciated.
Thank you.

This seems like a duplicate of How do I save/remember last-used window position and size for applications?, check that out and see if it is the same.


Touchpad detected as "PS/2 Logitech Wheel Mouse" on Asus N550JK On my Asus N550KL laptop (running Ubuntu Gnome 14.04), my touchpad is detected as "PS/2 Logitech Wheel Mouse".

xinput outputs:

⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ PS/2 Logitech Wheel Mouse                 id=13   [slave  pointer  (2)]
⎣ Virtual core keyboard                     id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Video Bus                                 id=7    [slave  keyboard (3)]
    ↳ Video Bus                                 id=8    [slave  keyboard (3)]
    ↳ Sleep Button                              id=9    [slave  keyboard (3)]
    ↳ USB2.0 HD UVC WebCam                      id=10   [slave  keyboard (3)]
    ↳ Asus WMI hotkeys                          id=11   [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=12   [slave  keyboard (3)]

There seem to be a duplicate of the question here:

Touchpad not recognized on Asus N550JK - TP500L (FocalTech)

but since the answer worked for me I will re-post it here:

  I finally came to this bug report:
  https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1372609

  It seems FocalTech touchpad needs a specific driver, and that work is
  in progress to integrate it into the mainline kernel.

  currently, there seem to be a ppa to get a dkms driver for this
  touchpad : http://ppa.launchpad.net/hanipouspilot/focaltech-dkms

  After trying this, I can confirm the following procedure works :

1. add ppa:

`sudo add-apt-repository ppa:hanipouspilot/focaltech-dkms`

2. update the packages database:

`sudo apt-get update`

3. install the dkms driver:

`sudo apt-get install focaltech-dkms`

4. reboot

  The touchpad in now recognized. Two finger scrolling works, for
  example. Also, the zone where the buttons are won't make the cursor
  move.

  Thanks for the community that retro-engeniered this (Asus just replied
  "no linux support nor technical information" to a request ! Very bad
  point to them (see the afore-mentioned bug report)).

(answered by alci, thanks a lot to you if you are reading me)

I just have a few things to add to this:

First, instead of rebooting, you can just run the following commands:

sudo modprobe -r psmouse
sudo modprobe psmouse

which will get it working just right =)

For those running Ubuntu 14.04:

I have not tested it myself, but the first command (sudo add-apt-repository ppa:hanipouspilot/focaltech-dkms) has a very nice verbose and explains the necessary steps for doing that on ubuntu 14.04, with the older kernel version.

Follow this step by step and you will get it working

Multitouch fix for Alps touchpad

Then execute these lines in terminal:

sudo update-initramfs -u


Install rJava on Ubuntu failed I try to install rJava package following
"sudo R CMD javareconf" and in R "install.packages('rJava', type = "source"), but it does not work.

First, I installed my Java in this way

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer

In my .bashrc, I have been setting

export JAVA_HOME=/usr/lib/jvm/java-8-oracle
export PATH=$PATH:$JAVA_HOME/bin

Then

     sudo R CMD javareconf
*** JAVA_HOME is not a valid path, ignoring
Java interpreter : /usr/bin/java
Java version     : 1.8.0_111
Java home path   : /usr/lib/jvm/java-8-oracle/jre
Java compiler    : /usr/bin/javac
Java headers gen.: /usr/bin/javah
Java archive tool: /usr/bin/jar

trying to compile and link a JNI program
detected JNI cpp flags    : -I$(JAVA_HOME)/../include -I$(JAVA_HOME)/../include/linux
detected JNI linker flags : -L$(JAVA_HOME)/lib/amd64/server -ljvm
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I/usr/lib/jvm/java-8-oracle/jre/../include -I/usr/lib/jvm/java-8-oracle/jre/../include/linux     -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c conftest.c -o conftest.o
gcc -std=gnu99 -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o conftest.so conftest.o -L/usr/lib/jvm/java-8-oracle/jre/lib/amd64/server -ljvm -L/usr/lib/R/lib -lR

JAVA_HOME        : /usr/lib/jvm/java-8-oracle/jre
Java library path: $(JAVA_HOME)/lib/amd64/server
JNI cpp flags    : -I$(JAVA_HOME)/../include -I$(JAVA_HOME)/../include/linux
JNI linker flags : -L$(JAVA_HOME)/lib/amd64/server -ljvm
Updating Java configuration in /usr/lib/R
Done.

Then

    Error : .onLoad failed in loadNamespace() for 'rJava', details:
  call: dyn.load(file, DLLpath = DLLpath, ...)
  error: unable to load shared object '/home/sunxd/R/x86_64-pc-linux-gnu-library/3.3/rJava/libs/rJava.so':
  libjvm.so: cannot open shared object file: No such file or directory
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/home/sunxd/R/x86_64-pc-linux-gnu-library/3.3/rJava’

The downloaded source packages are in
    ‘/tmp/RtmpxpdHF7/downloaded_packages’
Warning message:
In install.packages("rJava", type = "source") :
  installation of package ‘rJava’ had non-zero exit status

Simply start by installing r-cran-rjava from terminal

$ sudo apt-get install r-cran-rjava

Then from R, simply run this

install.packages('rJava')

I tried several of the above options, but nothing worked for me.
Then I tried

install.packages("rJava",dependencies = TRUE)

and it worked like a charm.


Ubuntu 18.04 on Dell Lat 5591: Ethernet Card not showing My Ethernet card is not showing on lspci. All I can do is use wireless which does not help me in my current state. Is this a dead ethernet card or something else?
lspci below (only wifi showing):

00:00.0 Host bridge: Intel Corporation 8th Gen Core Processor Host Bridge/DRAM Registers (rev 07)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor PCIe Controller (x16) (rev 07)
00:02.0 VGA compatible controller: Intel Corporation Device 3e9b
00:04.0 Signal processing controller: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem (rev 07)
00:08.0 System peripheral: Intel Corporation Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th Gen Core Processor Gaussian Mixture Model
00:12.0 Signal processing controller: Intel Corporation Cannon Lake PCH Thermal Controller (rev 10)
00:14.0 USB controller: Intel Corporation Cannon Lake PCH USB 3.1 xHCI Host Controller (rev 10)
00:14.2 RAM memory: Intel Corporation Cannon Lake PCH Shared SRAM (rev 10)
00:14.3 Network controller: Intel Corporation Wireless-AC 9560 [Jefferson Peak] (rev 10)
00:15.0 Serial bus controller [0c80]: Intel Corporation Device a368 (rev 10)
00:15.1 Serial bus controller [0c80]: Intel Corporation Device a369 (rev 10)
00:16.0 Communication controller: Intel Corporation Cannon Lake PCH HECI Controller (rev 10)
00:16.3 Serial controller: Intel Corporation Device a363 (rev 10)
00:17.0 SATA controller: Intel Corporation Device a353 (rev 10)
00:1c.0 PCI bridge: Intel Corporation Device a338 (rev f0)
00:1c.5 PCI bridge: Intel Corporation Device a33d (rev f0)
00:1d.0 PCI bridge: Intel Corporation Cannon Lake PCH PCI Express Root Port 9 (rev f0)
00:1f.0 ISA bridge: Intel Corporation Device a30e (rev 10)
00:1f.3 Audio device: Intel Corporation Cannon Lake PCH cAVS (rev 10)
00:1f.4 SMBus: Intel Corporation Cannon Lake PCH SMBus Controller (rev 10)
00:1f.5 Serial bus controller [0c80]: Intel Corporation Cannon Lake PCH SPI Controller (rev 10)
01:00.0 3D controller: NVIDIA Corporation GM108M [GeForce MX130] (rev a2)
02:00.0 PCI bridge: Intel Corporation JHL6340 Thunderbolt 3 Bridge (C step) [Alpine Ridge 2C 2016] (rev 02)
03:00.0 PCI bridge: Intel Corporation JHL6340 Thunderbolt 3 Bridge (C step) [Alpine Ridge 2C 2016] (rev 02)
03:01.0 PCI bridge: Intel Corporation JHL6340 Thunderbolt 3 Bridge (C step) [Alpine Ridge 2C 2016] (rev 02)
03:02.0 PCI bridge: Intel Corporation JHL6340 Thunderbolt 3 Bridge (C step) [Alpine Ridge 2C 2016] (rev 02)
3a:00.0 USB controller: Intel Corporation Device 15db (rev 02)
3b:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS525A PCI Express Card Reader (rev 01)
3c:00.0 Non-Volatile memory controller: Micron/Crucial Technology Device 2263 (rev 03)

I have the same problem with:
Fedora 5.2.9-200.fc30.x86_64 #1 SMP Fri Aug 16 21:37:45 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

I think there is some specific driver missing. I was searching on intel site, but without success. I will try to find out what is "00:16.0 Communication controller: Intel Corporation Cannon Lake PCH HECI Controller (rev 10)"

I figured it out. The problem was that in the BIOS the networking device for LAN wasn't activated


How to start in background a list of applications on login I observed the following thing:

I login on my computer account.
I run in the Terminal some-app
I wait about 20 seconds to start.
Then I close it.
I run same command in terminal.
It start in about 1 or 2 seconds.

I understood that this is called cache. Can anybody explain how does this work?

Also, what command must I run to make a fake start of the some-app to start quickly when I want to open it in UI?

I imagine that having a list of app names that I would pseudo-start on login will improve my Ubuntu experience.

Note that I don't want to start the application in the UI, just to initialize it somewhere in the background so when clicking the icon from the desktop to start very quick.

If you want to run some apps on the start up, try to add this apps on the end of the '~/.profile' file. For example, if you want to run thunderbird on the start up, just add 'thunderbird &' on the end. It worked for me.

a simple way to do the same thing and add programs to your session start up, just press ALT+F2 or type in terminal "gnome-session-properties" and add your "some-app" there.
Hope it helps.
EDIT : you can simply add this line to your startup :
gnome-terminal -x top
this runs a terminal and executes the command top on it ...


Display doesnt startup after lock Whenever I'm not using the laptop I turn the screen off using the Fn+F2 button which eventually reduces the screen brightness to 0. By default the lock screen should start in 10 minutes, after 10 minutes, when I hit Fn+F3 to increase the brightness, the display doesn't start and I have to forcibly shut it down and restart. How do I fix this?

Don't reduce the brightness.
Instead try to hibernate your laptop when not in use.
Close the flap and when u open it,laptop will automatically wake up.


Nvidia driver isnt recognized after ubuntu software update I'm using Ubuntu 18.04.4 LTS, with ah gpu by Nvidia, GeForce 1660Ti.

I dont know if this is a relevant information, but I use with a dual boot with Windows.

When I first installed everything, I had to change the driver configurations on ubuntu so the gpu could be recognized.

It worked perfectly by several months, but recently with a regular update of ubuntu my gpu drivers are not being recognized, I tried everything that I did for the first time but it didn't work.

Any suggestions? I'm kind of lost because I have no skills to deal with ubuntu problems.

output  of lspci -k | grep -EA3 'VGA|3D|Display' is

29:00.0 VGA compatible controller: NVIDIA Corporation Device 2182 (rev a1)
    Subsystem: Device 196e:1312
    Kernel modules: nvidiafb, nouveau
29:00.1 Audio device: NVIDIA Corporation Device 1aeb (rev a1)

Since you have an LTS kernel you have to install the Nvidia-lts version of the driver,  you should uninstall the other one and try with the LTS one


Configure ubuntu with two network adapters and a switch After 4 hours of trying to configure this I'm getting mad.

I've the next setup:

eth0: is the on board lan adapter and this one connect directly to a switch.
eth1: is the lan adapter (pci card) that connects directly to the main router and internet.

I'm trying to connect multiple machines to this computer running a dhcp-server (isc-dhcp-server) on it. And then configure the other machines to boot using lan.

This my current settings for interfaces:

# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo eth1 eth0
iface lol inet loopback

iface eth1 inet static
address 192.168.0.200
netmask 255.255.255.0
gateway 192.168.0.1
network 192.168.0.0
dns-nameservers 192.168.0.1 8.8.8.8

iface eth0 inet static
address 10.0.0.100
netmask 255.255.255.0
gateway 10.0.0.1
network 10.0.0.0

Note: With this configuration nothing works at all. If i remove the configuration of eth0 i can connect to internet an my router without problems. Otherwise nothing works.

And this my configuration to the dhcp:

ddns-update-style none;

option domain-name-servers 8.8.4.4, 8.8.8.8;

default-lease-time 600;
max-lease-time 7200;

# If this DHCP server is the official DHCP server for the local
# network, the authoritative directive should be uncommented.
#authoritative;

log-facility local7;

subnet 10.0.0.0 netmask 255.255.255.0 {
  interface eth0;
  range 10.0.0.100 10.0.0.200;
  option routers 10.0.0.2;
  option subnet-mask 255.255.255.0;
  option broadcast-address 10.0.0.254;
  option domain-name-servers 10.0.0.1, 10.0.0.2;
  option ntp-servers 10.0.0.1;
  option netbios-name-servers 10.0.0.1;
  option netbios-node-type: 8;
}

Thanks in advance!

you can do it by adding following commands to terminal

route del default
route add default gw 192.168.0.1


`sudo chmod +x *` caused me cannot open anything Today I used sudo chmod +x * -R in my $HOME folder, actually I didn't want to use it in $HOME folder, it was an accident. Afterthat I tried to use sudo chmod -x * to fix it. But now, I couldn't open any file in $HOME folder with user permission. I can use root permission to open them. I used ll to check that all files are owned by the user, but why can't I open them? Please help me.

my bash history(in ~/.bash_history):

sudo chmod +x * -R
ll
chmod -x -R *
ll
sudo chmod +x * -R
ll
sudo chmod +w * -R
ll
cd ~/Desktop/
sudo cd ~/Desktop/
sudo chmod -x *
ll
df -h
ll
cd ~/Desktop/
sudo cd ~/Desktop/
sudo cd /home/nix/Desktop/
sudo chmod -x * -R
ll
cd ~/Desktop/
su
gnome-open 1.png &
sudo gnome-open 1.png &
sudo gnome-open 1.png
cd
cd cd skypeFiles/
sudo cd skypeFiles/
ls -a
cd .config/
ls
cd ..
cd .local/
ls
cd share/
ls
cd applications/
ll
chmod +x *
ll
cd ..
chmod +x * -R
su
sudo chown nix:nix -R nix/
ll

At first I tried to chmod -x * to fix it, nothing works. And then I found that I can use sudo gnome-open to open files(while only gnome-open didn't work), I guessed maybe there was something worng with my .desktop files. After I entered .local/share/applications, there was only "mimeapps.list*" here, so maybe I was wrong.

nix@***:~$ ls -la
total 324
drwxr-xr-x 53 nix  nix   4096 Jan  1 14:01 .
drwxr-xr-x  3 root root  4096 Dec 29 21:40 ..
drwx------  3 nix  nix   4096 Dec 29 18:22 .adobe
drwx------  2 nix  nix   4096 Dec 31 21:40 .aptitude
-rw-------  1 nix  nix   9131 Jan  1 14:28 .bash_history
-rw-r--r--  1 nix  nix    220 Apr  9  2014 .bash_logout
-rw-r--r--  1 nix  nix   3870 Dec 29 20:51 .bashrc
-rw-r--r--  1 nix  nix   3870 Dec 29 20:51 .bashrc~

Considering for my privacy, I deleted some result of the command ls -la, for it didn't really matter in this problem.

by running

sudo chmod -x * -R

you just removed execution rights to everything under your current directory, including subdirectories. This should not prevent to open files in the current directory for editing or reading, but this prevents you to open subdirectories and the files inside. You do not have to fiddle with "root" user.
Just run the following :

find . -type d

and you should get an error

find: 'xxxxx': Permission denied

for all subdirectories xxxxx in your current directory which name doesn't starts with a "." (dot). To fix, run

find . -type d -exec chmod +x {} +

and your subdirectories access will be restored. You'll then have to set proper execution rights on any formerly executable file in your subdirectories tree. Only you can find which files need it.

Open your terminal and change to root user (else sudo would do)

First take a backup of current home directory of yours.

Then paste as

sudo chown -R youusername:yourusername /home/yourusername

That will again makes you true owner of your home.

Replace yourusername with your username.

let me know if any issues.


How to change pulseaudio sink with  "pacmd set-default-sink" during playback? I need to switch the pulseaudio server of a currently playing audio stream.

Pulseaudio server is set up with IP 192.168.1.105

$>cat /etc/pulse/default.pa
...
load-module module-esound-protocol-tcp auth-anonymous=1
load-module module-native-protocol-tcp auth-anonymous=1
load-module module-zeroconf-publish
...

On the source side VLC media player is playing a song.

I created a new tunnel sink with pulseaudio on source side.

pacmd load-module module-tunnel-sink server=192.168.1.105
pacmd set-default-sink 1

But while playing audio the server couldn't be changed immediately. Only after stopping the player and replay, it's ok.

From "gnome-volume-control" or "gnome-control-center sound" switching of output devices is applied immediately.

How can I apply switching the output sink immediately from command line during playback of a sound file?

PulseAudio pacmd is not capable of switching the default sinks while there is an actively playing stream to the sink input. However there is a way to still achieve this.
Changing default sink from command line
First we need to determine the index number of the sinks we want to switch. This can be done by calling:
pacmd list-sinks

Depending on our system this will give you a more or less lengthy list of sinks and properties that are at present accessible:
 >>> 2 sink(s) available.
      * index: 0
            name: <alsa_output.pci-0000_01_00.1.hdmi-stereo-extra1>
            driver: <module-alsa-card.c>
    :
    :
        index: 1
            name: <alsa_output.pci-0000_00_14.2.analog-stereo>
            driver: <module-alsa-card.c>

The index or the name given here is what we need for adressing the sink by command line. The present default sink is marked with an asterix (here 0).
To be able to switch the default sinks from command line we may need to disable stream target device restore by editing the corresponing line in /etc/pulse/default.pa to:
load-module module-stream-restore restore_device=false

To change the default output sink to sink 1 we then run
pacmd set-default-sink 1

Sucess can be visualized by opening the Sound Settings menu.
Moving a stream to another sink
Changing the default sink while we have an active input stream playing to a given sink has no effect. This should rather be done by moving this input to another sink.
pacmd list-sink-inputs

will tell us the index of the input stream
>>> 1 sink input(s) available.
    index: 5
    driver: <protocol-native.c>

We now know that we want to move the input stream 5 to sink 1 by calling
pacmd move-sink-input 5 1

or back to sink 0 if we like. This will be done immediately without the need of stopping playback.
Changing default sink while playing
Of course we can combine those two commands to immediately switch default sinks during playback e.g. with
pacmd set-default-sink 1 & pacmd move-sink-input 5 1

A drawback of this method is that the input stream index changes every time we stop and restart the music player. So we always have to find out the current stream index before we can switch using the commmand line.

I think there is one more option worth mentioning and it's available at the official page for FAQ about PulseAudio  at freedesktop.org. Under the following Title:

  How do I switch the default sound card, moving all
  applications?

They provide the following script to do so:

#/bin/bash
# paswitch 2011-02-02 by Ng Oon-Ee <ngoonee@gmail.com>
# I can't remember where I found this script, can't locate the original author.
# Please inform me if you know, so that I can give proper attribution.
# CHANGES: Added auto-move all inputs to new default sound card.
# WAS: Pulse Audio Sound Card Switcher v1.0 2010-01-13
#   Switches between soundcards when run. All streams are moved to the new default sound-card.

# $totalsc: Number of sound cards available
totalsc=$(pacmd "list-sinks" | grep card: | wc -l) # total of sound cards: $totalsc
if [ $totalsc -le 1 ]; then # Check whether there are actually multiple cards available
  notify-send -u critical -t 5000 "Nothing to switch, system only has one sound card."
  exit
fi
# $scindex: The Pulseaudio index of the current default sound card
scindex=$(pacmd list-sinks | awk '$1 == "*" && $2 == "index:" {print $3}')
# $cards: A list of card Pulseaudio indexes
cards=$(pacmd list-sinks | sed 's|*||' | awk '$1 == "index:" {print $2}')
PICKNEXTCARD=1 # Is true when the previous card is default
count=0 # count of number of iterations
for CARD in $cards; do
  if [ $PICKNEXTCARD == 1 ]; then
# $nextsc: The pulseaudio index of the next sound card (to be switched to)
    nextsc=$CARD
    PICKNEXTCARD=0
# $nextind: The numerical index (1 to totalsc) of the next card
    nextind=$count
  fi
  if [ $CARD == $scindex ]; then # Choose the next card as default
    PICKNEXTCARD=1
  fi
  count=$((count+1))
done
pacmd "set-default-sink $nextsc" # switch default sound card to next

# $inputs: A list of currently playing inputs
inputs=$(pacmd list-sink-inputs | awk '$1 == "index:" {print $2}')
for INPUT in $inputs; do # Move all current inputs to the new default sound card
  pacmd move-sink-input $INPUT $nextsc
done
# $nextscdec: The device.description of the new default sound card
# NOTE: This is the most likely thing to break in future, the awk lines may need playing around with
nextscdesc=$(pacmd list-sinks | awk '$1 == "device.description" {print substr($0,5+length($1 $2))}' \
                         | sed 's|"||g' | awk -F"," 'NR==v1{print$0}' v1=$((nextind+1)))
notify-send "Default sound-card changed to $nextscdesc"
exit
# Below text was from original author and remains unaltered
# CC BY - creative commons
# Thanks God for help :) and guys lhunath, geirha, Tramp and others from irc #bash on freenode.net


Installed 14.04 LTS... Wifi works for a while, then disconnects... requires reboot I'm having an issue with my laptop using Ubuntu Linux 14.04 LTS, and i'm not very savvy at linux at all, is when i'm using the wifi, it'll disconnect from the internet after a while... and then i'll need to reboot the machine to get it working until it disconnects again...

Here's my laptop...

HP Stream 13-c010nr 13.3″ Notebook - Celeron N2840 2.16 GHz - 2 GB RAM - 32 GB SSD

Any advice would be most appreciated... Thanks...

Download and install this Wifi Driver.. This original driver is very unstable on the hp stream when using Ubuntu.

Click Here

Extract and make install then reboot your Hp Stream. You will not have any more Wifi dropping problems anymore.


How to set up a home network I have been using windows 7 on both my home pc and my laptop and have been using the Homegroup feature to share files between machines.

Could someone please tell me how to achieve this using ubuntu 11.10 in the easiest way possible?

Via a graphical interface would be preferred.

You want to install Samba. By terminal or through Software center. You can then setup to view your Ubuntu files on a Windows computer. To do this you need to tell Samba what folders you want to share like Music or Pictures. Go to Samba and click the green add button. THat will let you add a folder to be shared.  However, I have not figured out how to view files from Windows computers on Ubuntu yet...

You should create a new resource in Samba and it will be shared.


How to turn off screen rotation in Ubuntu 18.04 LTS? In Ubuntu 17.04 there was 'Rotation' menu in Display tab. But now in new version of Ubuntu, there's still a Display tab but no more rotation menu. Now I can't turn that off again since I upgraded to 18.04 LTS.

The best solution I have found so far is to use the icon that is available in the top right corner of the screen, when you click on the down arrow. The icon is the one in red in the screenshot below:

It might also look like this:

use the code given below and it will work definitely

gsettings set org.gnome.settings-daemon.peripherals.touchscreen orientation-lock true

gsettings set org.gnome.settings-daemon.plugins.orientation active false


No keyboard backlighting I have bought an MS-industral Fusion keyboard.The keyboard supports backlighting and I have tested it on my friends Windows 7 and it worked.I am using Ubuntu 14.10 and backlighting does not work.All the multimedia keys do work.

Backlighting control is actually on the same key as scroll lock and that also does not seem to work.

The only reason I bought this keyboard is because of backlighting.It is helpful for late night programming,gaming and text writing sessions.

Edit:
I tested it on Openmandriva and Kali Linux right now and it does not work.
I also tested it on the alpha/beta Ubuntu desktop next with unity8(15.04) and it worked.When I pressed the button it also activated scroll lock.So maybe if we fix scroll lock.

Edit2:It also works during boot time all the way until the login screen appears.
Ediit3:It also works during shutdown.However I noticed if I use it during boot or shutdown it can hang the whole system.

Open Terminal then type:

xset led

enter, and see the magical happen!

I found my answer here in this link:
https://answers.launchpad.net/ubuntu/+question/262205


How to mount a new drive on startup I have recently installed a new hard drive to my Ubuntu 10.0.4 box. I used System -> Administration -> Disk Utils to format the disk (ext4 file type) - but did not create a partition (is this advisable?).

I have manually mounted the drive as /mydata.

I want to have the machine automatically mount the device on startup/reboot. How may I do this?

[[Update]]

This is the output from running sudo fdisk -l on my system:

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000858bf

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1       59334   476595200   83  Linux
/dev/sda2           59334       60802    11789313    5  Extended
/dev/sda5           59334       60802    11789312   82  Linux swap / Solaris

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/sdb doesn't contain a valid partition table

Disk /dev/sdc: 16.0 GB, 16026435072 bytes
254 heads, 63 sectors/track, 1956 cylinders
Units = cylinders of 16002 * 512 = 8193024 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1        1955    15641929    c  W95 FAT32 (LBA)

First of all your /dev/sdb isn't partitioned. I am assuming this is the disk you want to mount.

WARNING: THIS WILL DESTROY ANY DATA ON YOUR TARGET DISK

Run sudo fdisk /dev/sdb

Press O and press Enter (creates a new table)
Press N and press Enter (creates a new partition)
Press P and press Enter (makes a primary partition)
Then press 1 and press Enter (creates it as the 1st partition)
Finally, press W (this will write any changes to disk)

Okay now you have a partition, now you need a filesystem.

Run sudo mkfs.ext4 /dev/sdb1
Now you can add it to fstab

You need to add it to /etc/fstab use your favourite text editor

Be careful with this file as it can quite easily cause your system not to boot.

Add a line for the drive, the format would look like this.

This assumes the partition is formatted as ext4 as per mkfs above

#device        mountpoint             fstype    options  dump   fsck

/dev/sdb1    /home/yourname/mydata    ext4    defaults    0    1

Then on the next reboot it will auto mount.

This web page has a lot of useful info on fstab

If you do not want to partition or cannot afford to, you can use udisks to mount or unmount devices or disks. The UUID method is the most stable one as other ID methods can change if you rename your label for example.

udisks --mount /dev/sdb
udisks --mount /dev/disk/by-uuid/70439c63-de2c-4319-a832-0dee5ea05fc5
udisks --mount /dev/disk/by-label/HDD

It will in fact do the same as you would do by clicking the device on nautilus.

Just add it as a "startup application" to preform at login.

To unmount, (if you need to):

udisks --unmount /dev/sdb

Will do the same as clicking the unmount arrow in nautilus.

One disadvantage over the fstab method is the device will be mounted in /media/disk_label with no option to choose another mount-point.

One advantage is you do not need root access to mount or unmount the drive.

More info over different methods of auto-mounting : AutomaticallyMountPartitions


version `GLIBCXX_3.4.26' not found even though libstdc++.so.6 recent enough I realize there are many questions like this, but the difference from the others is that my libstdc++.so.6 actually does appear to be up to date enough (see below for the strings it exports). This is an error that comes up when trying to load a dynamic library that i just compiled myself. apt-get upgrade  and the like tell me libstdc++.so.6 already is up to date (on version libstdc++6 is already the newest version (9.1.0-2ubuntu2~18.04)).

Full error i get when loading this library (in MATLAB R2019a):

'/home/dee/git_repos/Titta/TobiiMex/TobiiMex_matlab/64/TobiiMex_matlab.mexa64':
/usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by
/home/dee/git_repos/Titta/TobiiMex/TobiiMex_matlab/64/TobiiMex_matlab.mexa64)

output of strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBC:

GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBCXX_3.4.11
GLIBCXX_3.4.12
GLIBCXX_3.4.13
GLIBCXX_3.4.14
GLIBCXX_3.4.15
GLIBCXX_3.4.16
GLIBCXX_3.4.17
GLIBCXX_3.4.18
GLIBCXX_3.4.19
GLIBCXX_3.4.20
GLIBCXX_3.4.21
GLIBCXX_3.4.22
GLIBCXX_3.4.23
GLIBCXX_3.4.24
GLIBCXX_3.4.25
GLIBCXX_3.4.26
GLIBC_2.2.5
GLIBC_2.3
GLIBC_2.14
GLIBC_2.6
GLIBC_2.4
GLIBC_2.18
GLIBC_2.16
GLIBC_2.3.4
GLIBC_2.17
GLIBC_2.3.2
GLIBCXX_DEBUG_MESSAGE_LENGTH

What can i try to fix this?

Install "libstdc++6" and "gcc-9" helped me. Hope it will help you too.
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt install gcc-9
sudo apt install libstdc++6

Search for other versions of libstdc++.so.6 in your system. You are probably picking up an older version of the dynamic lib.


Using Git as off-line alternative for Dropbox I am working with lots of text files daily and I use Dropbox as a way to restore earlier versions of files in case something goes wrong.

I am looking for simple way to suplement/replace Dropbox in that function in case my Internet connection goes off and Dropbox is not working. Basically, I would like use git to:

1) Automatically save every revision of every file on disk or in given folder, but limited to certain extensions (.html, .tex, .txt, .doc, .odt etc.)

2) Easily browse previous versions and restore them. Ideally, I would be able to choose destination folder for keeping revisions

Creating a new Git project for each file is not very good idea, so I am looking for something simpler that will just re-create folders structure with an option to restore previous versions.

How about using SparkleShare?

SparkleShare is intended for synchronizing projects between multiple contributors automatically using Git. You can use it basically as a tool for automatically saving changes to files it a version controlled Git repository, and don't need to use its multiple contributor features.

It will connect to various services, including BitBucket:

Here you can see the history it presents of a folder:

SparkleShare only saves changes and keeps a list of the changes. There is no way (that I know of) to use it to view a file at a particular commit. Clicking on the file in the Recent Changes dialog just opens the newest version.

So, you can use a Git client, such as Giggle  to view changes at particular commits:

However, Giggle will not let you view the actual file at a particular commit, instead forcing you to view changes. So, you might want to use a different client such as gitg :

(The black everywhere is a bug because I'm using the GNOME 3.8 PPA.)

You can install SparkleShare by clicking on this button:

Or, you can use this command in a terminal:

sudo apt-get install sparkleshare

If you use Linux, you can try Btrfs file system, it has wonderful backup functionalities.

If you move to FreeBSD or OpenIndiana you can use XFS.


I dont understad nmcli connection modify --temporary 802-11-wireless.cloned-mac-address 00:60:1B:EB:F8:73 This is from How can I set mac address using the command line in Ubuntu 16.04? , where I cannot contact the_velour_fog

I have this same problem but im stuck with the solution adonis proposed:

nmcli connection modify --temporary 802-11-wireless.cloned-mac-address 00:60:1B:EB:F8:73

Is this a command? What do I write instead of connection_name? I don't know where to find it.

nmcli connection up

If this is a whole command, do I && between them?

Yes, "nmcli" is a command.  It's a shortened version of NetworkManager command-line interface.  You can find it by using the "which" command, like this (but it should already be in your PATH)

[jcall@laptop ~]$ which nmcli
/usr/bin/nmcli

The 'connection name' will be something you created previously.  Your connections could be created from the command-line, but I usually just use the GUI to create them (especially wireless connections.)  You can list your connections with the command "nmcli connection show" or the abbreviated way "nmcli c s"  Here is an example of my connections...

[jcall@laptop ~]$ nmcli connection show
NAME              UUID                                  TYPE             DEVICE
Home_WiFi         c1c95bd9-78f3-4764-9922-971339702735  802-11-wireless  --
Hotel_WiFi        921ad0bf-e18e-4d90-87d9-0f1c852c3dc7  802-11-wireless  --
Google Starbucks  d5242485-ebd6-4152-a839-eaedacc49b4a  802-11-wireless  --
enp0s25           6c6036d5-4739-3540-ac21-bf7a04669ed6  802-3-ethernet   --

Finally, you need to execute the commands in order, one after the other.  You could use && to do that, if you want to create a long single-line command.  I usually just create a small script file to make things easier.  Here is my example.

[jcall@laptop ~]$ cat ~/bin/mac-changer.sh
#!/bin/bash

DEV=wlp3s0
NEWMAC=9c:d9:17:2e:ae:5f

if [ $# -lt 1 ]
then
  echo "You forgot to tell me which network to connect to..."
  echo "Please run \`nmcli con show\` for ideas..."
  exit 1
fi

if $(nmcli -t -f NAME con show | grep -q $1)
then
  nmcli connection modify --temporary $1 802-11-wireless.cloned-mac-address $NEWMAC
  nmcli connection up $1
else
  echo "Error: $1 is not a known network.  Please run \`nmcli con show\` for ideas..."
fi

You can either do a one whole command with && or in order. < Connection name > is the name of the wifi you are currently connected too. You dont have to input <> just the string name ex. MyWifi


Where is the "pysdm" package? I am new to Ubuntu. I have some old hardware lying around so I decided to build a backup/storage device. I am trying to follow this lifehacker article.

It asks me to open a terminal and run sudo apt-get install pysdm. However, I keep getting Unable to locate package pysdm. Does anyone know where my pysdm is or where I can get one. I have run ubuntu from a usb key and have installed it on a hard drive and get the same message.

Avoid using pysdm for now.

It's been removed from the Ubuntu archives for a reason:

  please remove Pysdm from Ubuntu repositories. It is obsolete (not
  updated since June 2006 !!), buggy
  (https://bugs.launchpad.net/ubuntu/+source/pysdm) , doesn't handle
  UUIDs (which is now fstab standard in all supported Ubuntu versions
  !!!) and it has already been removed from Debian repositories.

I would suggest to find an alternative for using in recent Ubuntu releases. Also consider reporting this to LifeHacker.

You could try to use the pysdm package from Ubuntu 12.04.

Downloadlink: http://ftp.ubuntu.com/ubuntu/pool/universe/p/pysdm/pysdm_0.4.1-0ubuntu3_all.deb

Download it and install it with sudo dpkg -i pysdm_0.4.1-0ubuntu3_all.deb.


No sound through hdmi to TV I have a Toshiba Satellite Laptop Model P745-S4102 with  Intel integrated graphics and Ubuntu 12.04 LTS installed recently. When I connect my HDMI TV to it I only get video through it and no audio. In the System Settings -> Sound, there is no option to select HDMI as the output. I read other threads in this site and it seems like at least guys had HDMI option but no sound. I don't even get that.

Please help!!

TL;DR: In short, some sound devices seem to have multiple profiles and each of these profiles might expose different outputs to the Ubuntu sound settings dialog; but they can be switched by the PulseAudio Volume Control GUI.

Install pavucontrol, run it via the GUI or a CLI, and switch to the configuration tab where you'll see dropdowns for every output containing their respective sound card profiles.

In our case, one of them was HDMI; and now on the sound settings configuration dialog, the option for HDMI output appears.

  Source: My girlfriend had come across this issue on her first day of using Ubuntu on her HP laptop. The solution for her was to follow Charlie Schams's suggestion at https://askubuntu.com/a/234784/69183.

I've just solved my own problem after reading through all other threads like you stated.

I right clicked on the bottom right speaker icon, clicked playback devices and when the window popped up I right clicked in a blank space under the speaker device and selected Show all disabled devices and then enable the devices I wanted to use.


How can I delete duplicate emails in Evolution? How can I delete duplicate emails from Evolution 2.32.2?

In 3.2.2, Ctrl-A (select all messages), Message -> Remove Duplicate Messages works for a folder.

I don't think you can do this (unless there is some kind of POP3 rule you can apply).

You will have to do it manually in your specific version.


Messed up with libudev files and now I can't boot So I wanted to test cgminer on ubuntu and I was getting an error message about missing libudev file so in a rush I tried to read a few answers on here but instead of fixing it, I just messed up things more.

Now when I restarted my pc I can't even boot into ubuntu.

In recovery mode the error is this:

mountall: error while loading shared libraries libudev.so.0 cannot open shared object file : no such file or directory

So I returned to console and tried to see history of what I messed up. These are the commands that I used when I messed up things about libudev.

sudo ln -sf /lib/x86_64-linux-gnu/libudev.so.1 /lib/x86_64-linux-gnu/libudev.so.0

cd /lib/x86_64-linux-gnu/
sudo ln -sf libudev.so.1 libudev.so.0

sudo cp libudev.so.0.13.0 libudev.so.1

So it looks like I overwrote some functional file or linked to some missing file but I don't know what to do because any thing that I try while i'm in recovery is telling me error that files are locked and it's read-only file no matter if i'm with root or my username.

I found an old installation of ubuntu and extracted libudev.so.0 file to my installation overwriting a messed up file and it worked on next boot. So i fixed it.


Session manager must be in idle state when requesting a shutdown This is the error message I get when trying to logout or shutdown from the menu in Xubuntu 16.04 on my Dell laptop.

Interestingly when I choose "Log Out..." from the actions menu the first time nothing happens, but if I try it again then do I get the Session manager must be in idle state when requesting a shutdown error dialog.

I have tried the answers here and here and some others from google to no avail.

I am able to shutdown by running sudo shutdown now from the terminal.

Not sure how to proceed.

The same thing happend with me today, it was the first time:
I've decided to go to the terminal mode by ctrl+alt+f1 and then find out the process id of session manager, by 'pidof  xfce-session' then close it with 'kill -9 ID'.
Then it started working fine.

Upgrading from 16.04 to 16.10 fixed the issue.


Installing ClamAV on Ubuntu 20.4 I want to install clamav. I follow the community documentation by doing
$ sudo apt-get install clamav

After confirming with y, the following happens at the end of the installation process:
Selecting previously unselected package clamav.
Preparing to unpack .../clamav_0.102.4+dfsg-0ubuntu0.20.04.1_amd64.deb ...
Unpacking clamav (0.102.4+dfsg-0ubuntu0.20.04.1) ...
Setting up libtfm1:amd64 (0.13-4) ...
Setting up libclamav9:amd64 (0.102.4+dfsg-0ubuntu0.20.04.1) ...
Setting up linux-image-5.4.0-45-generic (5.4.0-45.49) ...
Setting up clamav-base (0.102.4+dfsg-0ubuntu0.20.04.1) ...
id: ‘clamav’: no such user
Setting up clamav-freshclam (0.102.4+dfsg-0ubuntu0.20.04.1) ...
Created symlink /etc/systemd/system/multi-user.target.wants/clamav-freshclam.service → /lib/systemd/system/clamav-freshclam.service.
Setting up clamav (0.102.4+dfsg-0ubuntu0.20.04.1) ...
Processing triggers for systemd (245.4-4ubuntu3.2) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for libc-bin (2.31-0ubuntu9) ...
Processing triggers for linux-image-5.4.0-45-generic (5.4.0-45.49) ...
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-5.4.0-45-generic
/etc/kernel/postinst.d/zz-update-grub:
Sourcing file `/etc/default/grub'
/usr/sbin/grub-mkconfig: 12: /etc/default/grub: snd_hda_intel.dmic_detect=0: not found
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 127
dpkg: error processing package linux-image-5.4.0-45-generic (--configure):
 installed linux-image-5.4.0-45-generic package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 linux-image-5.4.0-45-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

What is going on? Is clamav not being maintained for Ubuntu 20.4 anymore?

As one of the comments suggested, it turns out to be an issue with the default way that grub was setup on my system. Run:
sudo nano /etc/default/grub

in my case, the following was written there:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""
snd_hda_intel.dmic_detect=0

place the dmic_detect line inside the linux_default line:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash snd_hda_intel.dmic_detect=0"
GRUB_CMDLINE_LINUX=""

save and run
sudo grub-mkconfig -o /boot/grub/grub.cfg

after that, the installatio nwas without a problem.
GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3 snd_hda_intel.dmic_detect=0"


"package is in a very bad inconsistent state - you should reinstall it before attempting configuration." Recently, i was installing the new version from 13.04 to 13.10 ubuntu while also watching a video.  Well, guess what happened, my desktop crashed for like 4 minutes and then upon gaining access to the desktop again everything seemed messed up like box symbols where characters should be.

I know it was a bad idea but i decided to reboot halting the installation process and now i am stuck with this error.

dpkg: error processing unity-lens-photos (--configure):
package is in a very bad inconsistent state - you should reinstall it before attempting configuration.

Errors were encountered while processing: untity-lens-photos
e: subprocess /usr/bin/dpkg returned an error code (1).

And it pretty much pops up everytime i try to upgrade, or install anything.  This was after i finished updating the rest of my files.  I have tried many things and read many threads.  I am really lost right now, please help.

Also i have no access to a panel and i am currently trying everything in the terminal.  Attempts to install a gnome panel have been halted by the error.

package is in a very bad inconsistent state - you should reinstall it before attempting configuration.

The issue is easy to fix. Just reinstall the package:

sudo apt-get --reinstall install unity-lens-photos

Try to remove untity-lens-photos package by running the below command,

sudo dpkg -r untity-lens-photos

And then reinstall it by running,

sudo apt-get install untity-lens-photos


"open in terminal" command in ubuntu 16.04, doesn't open terminal in changed directory In Ubuntu 16.04 LTS open in terminal command in right click menu always start the terminal with /home/user as working directory. Is there anyway to make it's functionality same as nautilus-open-terminal where terminal opens with current working directory where I have right clicked? I am using zsh as my default shell.

Okay, I guess I've found a fix for this. So, launch terminal go to Edit -> Profile Preferences -> Command and uncheck the option saying Run a custom command instead of my shell.

Try using krusader file manager. It has built in terminal emulator that opens in same directory.

Type in terminal

sudo apt-get install krusader


Sound not working on an Intel 5 Series/3400 lspci gives me these two devices:

$ lspci | grep Audio
00:1b.0 Audio device: Intel Corporation 5 Series/3400 Series Chipset High Definition Audio (rev 05)
02:00.1 Audio device: ATI Technologies Inc RV710/730

There are two devices listed in System Settings|Sound|Output:

RV710/730 Digital Stereo (HDMI)
Internal Audio Analog Stereo

And finally, the are not muted!

Also, when I run an application that accesses the sound card, I can see it in the Applications tab.

Any ideas?

It seems that the new kernel update (3.0.0-13) solved the problem.

I had the same problem. I solved reinstalling alsa modules
sudo apt-get install --reinstall linux-image-$(uname -r)


A way to install Nulled directadmin on ubuntu 12.10? Is there any way to install a Nulled Directadmin on Ubuntu 12.10? I want to learn how to use the Directadmin before i buy it, So i thought of installing a Nulled Directadmin first. Anyone know if it is possible to install it and if so, Then how to install it?

You can easily ask DirectAdmin staff for a trial license. Nulling a commercial product is a criminal offense.


Uninstall ubuntu and install it again along with windows I use Ubuntu 12.04LTS and now I want to format my laptop and then make two OS get installed:-

Windows 7 or Windows 8.
Ubuntu 12.04LTS.

Please tell me  step by step way to do the same.

I am having problem basically during uninstalling the Ubuntu as I don't know how to do it.

If you want to install windows with an existing Ubuntu,

create a new partition by re-sizing you partition using Gparted in
Ubuntu
Format it as ntfs.
Now boot with windows installation disk and install it on newly created partition.
You will need to reinstall GRUB after installing window. Here is how
reinstall GRUB. help.ubuntu.com

.

.

Just install the windows 7/8 normally and than install ubuntu 12.04 by using ubuntu windows installer.
Watch this video.
http://www.youtube.com/watch?v=BqNqOrWkhOM&list=PLjnOm_giI__5mtLIAzk3KyzNOBfZblo2b&index=2


Rare Full Partition Behaviour Yesterday, I had my main Linux partition more than 60% free.

Today, I tried to upgrade the system (as usual, each day) and it tells me: There is not enough room to perform the upgrading. Please, free 70 GB at least.

Then, I checked the partitions and... Effectively, really, the main Linux partition is almost full!

But... I didn't load (install) anything new!

I tried to free space with the following commands:

sudo apt-get autoremove
sudo apt-get autoclean
sudo apt-get clean
sudo apt-get purge
sudo dpkg -l |grep -i ^rc
sudo dpkg -l |grep -i ^rc | cut -d " " -f 3 | xargs dpkg --purge

And... NOTHING! The system doesn't free anything.

At the same time, when I type sudo -i into the Terminal session, the system tells me:

Impossible to resolve the host 'my_user_name'

What's wrong here?

How can I fix it?

This problem was almost auto-solved.

The problem began when a WineHQ (Windows) apps chrashes.

I think/guess/assume that some temporary hidden files used by that app, filled the partition.

I ran that app again and... "magically" the partition goes back to the original state (more than 70% empty).

The only one question still is in my mind is:

Is there a way to avoid this? ???


Ubuntu 18 install - grub error : invalid buffer alignment First question here, please let me know if i'm inaccurate.

I'm trying to install ubuntu 18 in dual boot with windows 10. I made my usb with rufus in gpt mode an i can boot on it but when i click on install ubuntu or try ubuntu without installing i obtain a black screen with the following output :

error : invalid buffer alignment -1070023623
error : you need to load the kernel first

Press any key to continue...

So i go into grub command-line and whichever command i use i obtain the following output :

error : invalide buffer alignment -1070023599

except with the command set which allows me to see a long lists of options, here are 4 of them as example:

?=29
cmdpath=(hd0,gpt1)/EFI/BOOT
prefix=(hd0,gpt1)/boot/grub
root=hd0,gpt1

Do you have any idea how to fix this so i can finish my install ?

Thanks guys !

I had a similar issue trying to install Debian 10. It turned out that the supplier had formatted the disk as NTFS. I booted from a live CD, ran GParted to remove teh NTFS partition, and create the ext4 and lvm partitions that I wanted. The install then proceeded OK.

I have a similar issue after installing onto a USB NVMe external drive - installation found the drive, installed perfectly and then on initial boot it comes up with this same message.

This, to me, points to a grub issue as my distro is CentOS 8 and the post is more a fyi and bread crumbs for other people searching the net for answers.

** if I select 'system setup' at the bottom of the grub menu and then select the same UEFI partition it boots without issue. Maybe hardware related? HP x360 Spectre (intel:1065g7 version)


Keyboard icon on Unity panel dissapeared Possible Duplicate:
  Where is the UIM notification area icon in Unity?

I've noticed that I don't have a keyboard layout icon on unity panel. There are 3 layouts configured, but I can't change between them, not even with defined keyboard shortcuts. How to solve this issue and how to get the icon back to the panel?
Ubuntu 11.10/Unity

Keyboard Layout is available with "System Settings" and that is the icon that appears in the launcher even if Keyboard Layout is directly executed from Dash. System Settings is always available under the Gear icon in the upper right of your screen. You can chose to have System Settings available from the launcher by right clicking the icon when it's running and selecting "Keep in launcher".


Orca screen reader not working after changing settings Earlier Orca was giving speech output but after I gave the command orca --text-setup on terminal and pressed 'y' for all the options Orca is not giving any audio.

How can I get Orca to work?

I had the same problem and fixed it by doing the setup through the RUN window ie press ALT+F2. Seems it doesn't get to the language setting if try setup using terminal so it runs in the background not doing anything.

So reboot your computer & press ALT+F2, and a RUN box will appear.

Type: orca -t and make sure to tick the Run in terminal box before clicking the Run button.

A menu will appear. I chose 4. espeak  as I was able to get espeak to work independently in terminal on my system. I checked by typing in a new terminal:  espeak "hello" & it spoke to me, wonderful!

Next it came up with a language selection choice. This menu was missing if I tried setup through terminal. Choose your language. I chose Yes for all the subsequent questions except Braile which I set to No. Also I chose option 2. for Laptop.

Press enter at the end, terminal may or may not close but it seems not to matter either way.

You may need to turn on screen reader:

Applications > System Tools > System Settings > Universal Access > follow your nose


Resolution Too High for Programs on XPS 13 I installed Ubuntu 15.10 (upgraded from 15.04) on the XPS13 (9343, Windows version).
As this ultrabook has a very high resolution touch-screen (3200x1800), I followed some useful threads on how to fix the resolution problems.
As an example, here it is simply explained how to increase the font size in UNIX, and that work perfectly for all UNIX's windows.
It worked also for Firefox's text, bar and tabs' names, but the "check boxes" and some other features are still tiny.

An additional problem that I can't solve is that the font/objects size in
the programs I use is still very small (see example below).
Also, my cursor has usually a normal size when moving on UNIX's windows, but when it goes on some other programs' windows, it becomes way smaller (you can see the black arrow in the Skype window).

Any hint about it?
I'll be happy to provide more details if needed.

Open up your terminal and type this command:

gsettings set org.gnome.desktop.interface scaling-factor 2

It sets the Window scaling factor, which is a factor used to scale windows on high-dpi screens, to 2.


Can no longer connect to my phone's wifi hotspot Ubuntu v 16.04 At 3 o'clock Ubuntu was connecting to my phone as a wifi hotspot automatically.  At 4.30 after being left on suspend, it would not longer connect.

I have tried these:

Shut down and restart. No success.
Test the hotspot by booting to Windows 10.  Successful, so the hotspot is working.  I am using W10 to send this message.
Reenter the password. No success
change the password on my phone's hotspot configuration.  No success.

From the above it will be obvious that the the phone is being detected.  Its just that the password is not being accepted.

I do hope that someone can help.

Nick

This is what worked on my Dell Inspiron Laptop.  I switched off wifi using the f2 key and then switched it on again.  That's all.

Nick


Is there any Sound enhancers/equalizer? What I am looking for is to have system wide implementation of sound enhancements like bass boosts, echoes, Fidelity, Stereo enhancement and so on.

Audio Video players have their own equalizer but they enhance only the audio / video files they are playing.

So to enhance sounds playing such as: YouTube, Spotify, System Sound, etc. I need a enhancer software. Back in Windows, I used to use SRS HD audio lab to do the same.

P.S. I have a horrible Speaker set.

PulseAudio Equalizer is the way to go.

Here’s a blog post about it: http://www.webupd8.org/2013/10/system-wide-pulseaudio-equalizer.html

Since pulseaudio-equalizer is part of Ubuntu 17.04, you can simply enable the universe repository and then issue the installation command:

sudo apt-get install pulseaudio-equalizer

For older releases, add the PPA first:

sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update

Are PPAs safe to add to my system and what are some "red flags" to watch out for?

After PulseAudio Equalizer is installed, you can launch its GUI with the applications qpaeq or pulseaudio-equalizer-gtk.

I've recently described it here: Global_equalizer_for_ALSA


VirtualBox not starting after kernel upgrade Yesterday I received a kernel upgrade and after reboot, VirtualBox stopped working.

Here is my system info (after kernel upgrade):

matteo@workstation:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.3 LTS"
matteo@workstation:~$ uname -a
Linux workstation 4.4.0-116-generic #140-Ubuntu SMP Mon Feb 12 21:23:04 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

I installed VirtualBox long ago with

sudo apt install linux-headers-$(uname -r)
sudo apt install virtualbox-dkms virtualbox virtualbox-qt

used on daily basis and never had problems with kernel updates. The error I receive now is

matteo@workstation:~$ sudo modprobe vboxdrv
modprobe: ERROR: could not insert 'vboxdrv': Exec format error
matteo@workstation:~$ dmesg | tail -n 1
[ 1413.167311] vboxdrv: version magic '4.4.0-116-generic SMP mod_unload modversions ' should be '4.4.0-116-generic SMP mod_unload modversions retpoline '

I found a forum post with this error message here from three days ago, unfortunately without resolution. Therfore I tried to remove the VirtualBox packeges from the Ubuntu repo, and install the latest 5.2 using this procedure. However, even after rebooting the machine, the error remains.

What can I do in this case?

I was facing the same problem. After kernel upgrade my gcc version was showing as 5.4.1. Downgrading this version to 5.4.0 helped me to have retpoline for vboxdrv kernel module.

Following steps from this link helped me solve my issue:

sudo apt-get install ppa-purge
sudo ppa-purge ppa:ubuntu-toolchain-r/test
#Select gcc version 5 using update-alternatives manually
sudo update-alternatives --config gcc

After these steps gcc --version should be (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609

Then purge all the new linux headers (4.4.0-116)

sudo apt-get purge linux-headers-4.4.0-116 linux-headers-4.4.0-116-generic linux-image-4.4.0-116-generic linux-image-extra-4.4.0-116-generic linux-signed-image-4.4.0-116-generic

Again install them

sudo apt-get install linux-generic linux-signed-generic

Then re-install virtualbox, I installed latest virtualbox-5.2 this time, but default 5.0 version of virtualbox should also work fine.

sudo apt-get purge virtualbox-dkms virtualbox virtualbox-qt
sudo apt-get install virtualbox-5.2

And, we have retpoline support in latest module

anirudh@AHDRMD34579:~$ modinfo vboxdrv
filename:       /lib/modules/4.4.0-116-generic/misc/vboxdrv.ko
version:        5.2.6 r120293 (0x00290000)
license:        GPL
description:    Oracle VM VirtualBox Support Driver
author:         Oracle Corporation
srcversion:     4880B21EFF1B605D6402982
depends:
vermagic:       4.4.0-116-generic SMP mod_unload modversions retpoline
parm:           force_async_tsc:force the asynchronous TSC mode (int)

I also had this problem recently and posted a question here about it. I did some digging and this is indeed a known issue.

The bug report is in my link.

Virtualbox has suddenly stopped working

I think the general concensus is to boot into the 4.4 kernel until the issue is fixed. (It is certainly the easiest solution for me.)


Ubuntu 14.04 Nautilus has no menu - File, Edit etc. don't exist Since Ubuntu 13.04, and now 13.10 and 14.04, my Nautilus (Files) has no application menu.

This means that I can't access Edit>Preferences and can only change preferences via dconf-editor, as the 'show hidden files' option keeps turning itself on.

No, it's not hidden in the global menu, whether the global menu is disabled in settings or not.

I've spent hours searching Google for an answer and tried every suggestion, including:

Reinstall Nautilus, removing the ~/.config/nautilus and ~/.config/nautilus-actions folders
UBUNTU_MENUPROXY= nautilus
Installing the appmenu list of programs
Removing the appmenu list of programs

Can anyone help?

Run dconf-editor, navigate to org > gtk > settings > file-chooser, then untick show-hidden.

Press Ctrl+h to show hidden files, press it again again to hide them.

Press the alt key.

OR ...

Move your mouse to the top of the screen.


Video player with convenient API I am trying to move from Windows to Ubuntu. I've find Linux alternatives to most of the programs except for  Media Player Classic (MPC-HC) + AutoHotKey.

I am looking for a video player running on Linux and allowing to bind these these operations to hotkeys:

Save current file path (or track number) to clipboard (or append to a log file)
Increase/Decrease saturation/hue/brightness of this video
Set aspect ratio (AR)
Scale video to 200%
Toggle playlist, controls,...
Save playlist as.

I plan to write Python or Java Controller program to control player via an API. Ideally player should have an API to

detect shortcut key and pass info to Controller
retrieve information about Player's state
execute Controller's command (frame step, reset width, jump to 11 min),..

VLC doesn't have change hue function.

Would a Lua or C API be suitable? mpv is, by my understanding, one of the more popular media players for Linux and it seems to be very full-featured in terms of integrability. https://mpv.io/manual/master/#command-interface

I am sorry, if you find this off-topic because of using non-native way, but you can install Wine to use MPC-HC.

Wine is a compatibility layer capable of running Windows applications on several operating systems.

About installation you can refer to https://wiki.winehq.org/Ubuntu


how to send email without password? This might be naive.

But is it possible in Ubuntu to have a script send out emails without requiring passwords? (via a dummy mail server, maybe)

I was hoping to use this to allow my account to periodically send info to myself (a real email account), for example, when certain task is completed. And I don't really want to risk storing the password for a real, external email account on the hard drive.

Possibly, or at least it's worked for me...

My [home] ISP allows me to send mail with the only validation being my sending IP address (that I send the email from my home & not elsewhere).

I can

telnet smtp.myisp.net 25

into their mail server & enter commands needed to send email (as if I was a MUA) then exit, which of course allowed me to script it & use it for myself (alert me to jobs, events etc).

I've even had scripts send externally (not to my isp's email address), but I've also had these rejected (I didn't explore; it was sent externally because of a typo, not intentionally).

--
My use of telnet was NOT intended to be the end result; it was only to prove that it's possible. My script calls functions & does not shell out to telnet. Telnet was just to prove the idea worked before I wasted time scripting it, but YES this is a dirty hack.


Cleaning the command line (like `ESC` in Windows) When have the garbage in the command line, I can simply hit escape and it is cleaned. Nothing happens in Linux. What is the corresponding command? Backspace over the whole string is boring and stupid.

I would like to crosspost to both linux and unix forum, since I think this applies to both.

You could use

ctrl+l

to clear your screen. Or

ctrl+u

to clear the line before your cursor. Or

ctrl+c

to abort your command.

Use reset to clear the terminal all the way up.


How do I set Windows to boot as the default in the boot loader? How do I set the bootloader so that in my dualboot with Windows 7/Ubuntu 11.04, Windows start up as standard instead of Ubuntu?

Customizing the /etc/default/grub file

There are two ways of doing this using editing a grub file. These are described in the Ubuntu Community Documentation Grub2 page

The two ways are:

Boot which ever operating system you booted last time, the "saved method"

This is the one I use.  It lets me decide which one I going to use and will allow me to reboot into that system, handy when I'm updating.

Boot a specific operating system by default.

The answer to your exact question.

Finding the menuentry to set as the new default

To start we need to find out what we are booting or want to boot. Open a terminal with Ctrl+Alt+t and type in

  grep menuentry /boot/grub/grub.cfg

user@YourComputer:~$ grep menuentry /boot/grub/grub.cfg
menuentry 'Ubuntu, with Linux 2.6.35-31-generic' --class ubuntu --class gnu-linux --class gnu --class os {
menuentry 'Ubuntu, with Linux 2.6.35-31-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
menuentry 'Ubuntu, with Linux 2.6.35-30-generic' --class ubuntu --class gnu-linux --class gnu --class os {
menuentry 'Ubuntu, with Linux 2.6.35-30-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
menuentry "Memory test (memtest86+)" {
menuentry "Memory test (memtest86+, serial console 115200)" {
menuentry "Windows NT/2000/XP (loader) (on /dev/sda1)" {
menuentry "Ubuntu, with Linux 2.6.32-34-generic (on /dev/sdb1)" {
menuentry "Ubuntu, with Linux 2.6.32-34-generic (recovery mode) (on /dev/sdb1)" {
menuentry "Ubuntu, with Linux 2.6.32-33-generic (on /dev/sdb1)" {
menuentry "Ubuntu, with Linux 2.6.32-33-generic (recovery mode) (on /dev/sdb1)" {
menuentry "Windows Vista (loader) (on /dev/sdc1)" {

You can see that the "saved" method can come in handy when booting multiple operating systems. Save the name of the entry you want e.g. Windows NT/2000/XP (loader) (on /dev/sda1), we need it later.

Editing the /etc/default/grub file

Type in the terminal

  sudo nano -B /etc/default/grub

and your password if asked. The nano editor will open.

A. Saved method - In my preferred way, I made the following changes from the standard grub file.

I changed the value of GRUB_DEFAULT to saved:

GRUB_DEFAULT=saved

I enabled the SAVEDEFAULT functionality by adding the following line:

GRUB_SAVEDEFAULT=true

B. Specific menuentry - In the way you are asking for

Change the value of GRUB_DEFAULT to the name of the Windows system you want to always boot. The name of the corresponding Grub menuentry can be found as described in the previous section.
I wanted to have Window XP always set as default at boot, I would set GRUB_DEFAULT to "Windows NT/2000/XP (loader) (on /dev/sda1)":

GRUB_DEFAULT="Windows NT/2000/XP (loader) (on /dev/sda1)"

Note: Some versions of Ubuntu require single quote (') vice double quote (").

You could also set GRUB_DEFAULT to the line number in the menu entry list (with 0 being the first), but when the kernel in Ubuntu is updated grub adds the new kernel to the top of the list, you would have to change the number, since Windows is the last one in the menu entry list.  You can see this in my menu entry list.

Update the boot configuration

Now you have to run

  sudo update-grub

to update the system generated grub.cfg file in the /boot/grub/ directory.

user@YourComputer:~$ sudo update-grub
Generating grub.cfg ...
Found background: /usr/share/images/grub/Apollo_17_The_Last_Moon_Shot_Edit1.tga
Found linux image: /boot/vmlinuz-2.6.35-31-generic
Found initrd image: /boot/initrd.img-2.6.35-31-generic
Found linux image: /boot/vmlinuz-2.6.35-30-generic
Found initrd image: /boot/initrd.img-2.6.35-30-generic
Found memtest86+ image: /boot/memtest86+.bin
Found Windows NT/2000/XP (loader) on /dev/sda1
Found Ubuntu 10.04.3 LTS (10.04) on /dev/sdb1
Found Windows Vista (loader) on /dev/sdc1
done

Addendum

Notes on nano

nano is especally easy to use in the terminal.  Move around with the arrow keys.  Type in you addtions, delete the unwanted.

The -B or --backup option backs up the previous version of it to the current filename suffixed with a ~.  Very handy in case of the dreaded Fat pfinger effect.

When you are through, Ctrl+o will allow you to save your edits by hitting Enter and Ctrl+x will close.  These and other options are shown at the bottom of the terminal screen with the ^ indicating Ctrl.

^G Get Help    ^O WriteOut    ^R Read File   ^Y Prev Page   ^K Cut Text    ^C Cur Pos
^X Exit        ^J Justify     ^W Where Is    ^V Next Page   ^U UnCut Text  ^T To Spell

Notes about nano, sudoeditor and other editors

Some in the Ubuntu community suggest sudoedit instead of nano.  I recommend nano — which is the default sudoedit editor in later distributions of Ubuntu — instead of sudoedit, because the default can be overridden in non-obvious ways, unless you are an administrator.  sudoedit is safer in that it automatically saves a backup copy of the edited file, but the -B command line option in nano does the same thing.  nano is more intuitive than editors like vi or emacs, which are very flexible but require learning a lot of commands, shortcuts or different modes.

If you prefer not to use the nano editor and prefer the Gnome Text Editor, instead of sudo nano -B use gksu gedit.  I generally do this for large files, and /etc/default/grub could easily be considered a large file.  Thus type in gksu gedit /etc/default/grub instead of sudo nano -B /etc/default/grub.  Note that the Gnome text editor does not automatically make a backup!

Notes on my grub file

I made some changes to grub for my personal needs.  Such as the background picture of the moon launch.  How to do these are discussed at the Ubuntu Community Documentation page on Grub2, recommended.

Good luck!

Normally when I have to "mess up" the Grub I use "Grub Customizer", it has a GUI so you can see easily what you are changing.
Just type this into the terminal:

sudo add-apt-repository ppa:danielrichter2007/grub-customizer
sudo apt-get update
sudo apt-get install grub-customizer

Then search in the Dash for grub customizer and change the predefined entry to Windows.


Ubuntu 16.04 auth_pam broken I'm trying to set up a mail server on a fresh Ubuntu 16.04 machine but I can't get it to work properly.

I'm using a Postfix/Courier setup with MySQL for authentication.

Receiving emails and reading them using any email client (using POP3 and IMAP) works as expected but when I'm trying to send something all I get is a authentication error and these errors appear in the log:

saslauthd[29975]: PAM unable to dlopen(pam_mysql.so): /lib/security/pam_mysql.so: undefined symbol: make_scrambled_password
saslauthd[29975]: PAM adding faulty module: pam_mysql.so
saslauthd[29975]: DEBUG: auth_pam: pam_authenticate failed: Module is unknown
saslauthd[29975]: do_auth         : auth failure: [user=office@testubuntu1604.com] [service=smtp] [realm=testubuntu1604.com] [mech=pam] [reason=PAM auth error]

This used to work perfectly in Ubuntu 14.04.

Are there any changes in Ubuntu 16.04 regarding PAM authentication I should know about?

Using Courier's authdaemon works, but it is necessary to perform the following to make the courier authdaemon usable from within Postfix's chroot:

sudo service courier-authdaemon stop
sudo rm -rf /var/run/courier/authdaemon/ /var/spool/postfix/var/run/courier/authdaemon/
sudo mkdir -p /var/spool/postfix/var/run/courier/authdaemon/
sudo ln -s /var/spool/postfix/var/run/courier/authdaemon/ /var/run/courier/authdaemon
sudo service courier-authdaemon start

Then just include the following in /etc/postfix/sasl/smtpd.conf

pwcheck_method: authdaemond
authdaemond_path: /var/run/courier/authdaemon/socket
mech_list: plain login
log_level: 9

source: https://www.hostsom.com/postfix-mysql-courier-imap-ubuntu-16-04-part3/

source: http://wiki.tolien.co.uk/Postfix_w/o_Maildrop#Courier-Authdaemon

(posting this as a new solution rather than a comment on the existing solution because I don't have the reputation to comment yet, and the existing solution was missing an important step)

If you use courier IMAP it's also possible to authenticate using its authdaemon like this https://www.hostsom.com/postfix-mysql-courier-imap-ubuntu-16-04-part3/


The show technical items button is missing I just installed Ubuntu 15.04 vivid i386. In the software center the option to show technical items is missing? I have no idea what to do.

I updated Ubuntu using the Software Updater and rebooted. I repeated this a few times. I tried again opening the Software & Updates app and on the first tab 'Ubuntu Software' I changed Download from: Server for United States to Main Server. I updated again. No change.

Then I changed back to Server for United States. I tried looking for the 'Show technical items' to appear at the bottom of Software Center screen after searching for xfce4. I still did not see it appear.

When I returned to the laptop I tried searching for xfce4 in the Ubuntu Software Center and low and behold it presented 'Show 71 technical items at the bottom of the screen. Perhaps the laptop needed to be left alone to finish downloading information from the servers after the fresh install.


Prevent SFTP from disconnecting I am using the latest version of FileZilla (3.9.0.6) to connect to a fully up-to-date Ubuntu Server 14.10 with OpenSSH. When I SSH into the server using PuTTY, the connection never times out. I stay connected indefinitely and am not disconnected. When I SFTP in, however, I am disconnected after roughly five minutes or so of no activity. The specific message is Disconnected from server.

The guides I have found (1 and 2, among others) say to add ServerAliveInterval 60 to /etc/ssh/ssh_config or to add ClientAliveInterval 60 to /etc/ssh/sshd_config. I tried both of these but neither has worked--I still receive the "Disconnected from server" message.

FileZilla has an option to keep FTP connections alive, and that would make things simple, but a) that option is in the FTP section (not the SFTP section), and b) directly underneath the option it says that proper servers do not require that option to be set and to contact the server admin if the option is necessary.

What do I need to do to set my server so that SFTP connections are indefinitely kept alive?

The sftp protocol does have a keep alive features but they are not exposed in the filezilla client.

Still I don't believe such a setting should be necessary.
I'm failing to reproduce your problem. I have had a Filezilla connection open to my Ubuntu ssh server for over 20 hours without any disconnects.

So I believe that problem is network related. Do you connect to this machine through a firewall/ wobbly wifi? or has the machine got some kind of packet filtering software installed  and configured like iptables or fail2ban

It's seems more probable that this is the reason for your disconnects.


How to completely uninstall docker I followed the uninstall instructions here. Then I ran these commands:

sudo apt-get purge docker-engine
sudo apt-get autoremove --purge docker-engine
rm -rf /var/lib/docker

So after I did all this I ran this command to see if docker files are any where else:

sudo find / -name '*docker*'

I found several places where docker files still exists.

/etc
/sys
/lib
/usr
/usr
/run
/proc
/var

Docker exists in subfolders in the list above. I can post every path if you like. There is about 200 locations.

Is there a way to totally and completely remove docker everywhere?

To completely uninstall Docker:

Step 1

dpkg -l | grep -i docker

To identify what installed package you have:

Step 2

sudo apt-get purge -y docker-engine docker docker.io docker-ce docker-ce-cli
sudo apt-get autoremove -y --purge docker-engine docker docker.io docker-ce

The above commands will not remove images, containers, volumes, or user created configuration files on your host. If you wish to delete all images, containers, and volumes run the following commands:

sudo rm -rf /var/lib/docker /etc/docker
sudo rm /etc/apparmor.d/docker
sudo groupdel docker
sudo rm -rf /var/run/docker.sock

You have removed Docker from the system completely.

You can identify the packages those files originated from with a command like dpkg-query -S $(sudo find / -name '*docker*' -print 2>/dev/null). Any such packages that you do not need, you can remove with sudo apt-get purge <package>. Please use care when you do so as some packages include some support for docker, but you might not want to remove, say, a text editor or a file manager for that reason.

If some files did not originate from packages (indicated by "dpkg-query: no path found matching pattern path"), you can remove them individually. Again, please use caution, as there may be files unrelated to the docker you want to remove, which simply have the string "docker" in their names.


Basic Web Development IDE/Editor like Dreamweaver? I've used Windows for many years, using Dreamweaver as my editor as it had a file tree which is based on a project (via Local, FTP or SFTP).

I need a web development IDE with the following functionality:

syntax highlighting for PHP, HTML, CSS, JavaScript
file tree - Local, FTP, SFTP, Project-Based (e.g. via the methods of Local/FTP/SFTP) in other words, like Dreamweaver
can open multiple files (tabbed)

Additionally, I wouldn't mind features like debugging, class listings, etc, as long as I can hide them away.

Even when I added the accepted answer at the question mentioned by @fossfreedom, more precisely at Dreamweaver alternative in ubuntu?, in the comments of your question. I must accept that I didn't notice before the existence of Aptana Studio.

I include here a few screenshots for you, covering some of the points of your interest.

Syntax Highlight for PHP:

Syntax Highlight for HTML:

Syntax Highlight for CSS:

Syntax Highlight for Javascript

File tree illustrated in these screenshots and this examples:

Project Explorer:

Application Explorer:

Multi-Tabbed files

illustrated in the above screenshots.

I have noticed that there is support for FTP/SFTP file browsing/management but these are features that I don't use so I can't provide further details but I am sure you will find it in the Aptana Studio site.

In my experience, I stopped using all these tools that I formerly used in order to start enjoying this excellent application, that tops all the other similar alternatives.

I suggest you to try it. Is as easy as download and run, or follow the instructions of the producers in order to have this application installed and running in your system. For me is good to have it inside of my home folder, from where I start it by double clicking the program's icon. The application will find its updates and download to the appropriate folder when necessary.

There are several alternatives, like those mentioned in the previous questions, including those that features WYSIWYG editors. But this is also a great alternative.

Good luck!

I spend many time to find replacement, but true is Quanta, KompoZer and others great horror against Dreamweaver.

So ur can did it my way, use Wine for DW and +Firebug+GoogleDeveloperTools.


How to Install Ubuntu 14.04 with RAID 1 using desktop installer? Many people claim that it is impossible to install Ubuntu onto RAID 1 with the Desktop CD. Is this really true? If not, how can it be done?

Edit: This guide does not take UEFI boot into account. Additional or different steps may be required if UEFI boot is desired. This guide assumes legacy boot!

It is true, that the ubiquity installer does not know about mdadm software raid devices. Also it is true, that the live-cd is missing the mdadm raid administration tool. However, doing some work by hand, it is very much possible to install Ubuntu on RAID1.

In the following I will assume two identical hard disks (/dev/sd[ab]) which will be used completely for our new install. To simplify the recovery if one drive fails, there will be only one mdadm-volume /dev/md0 which will then be partitioned for /, swap and data storage, e.g. /home.

After booting up the live-cd and (if necessary) configuring network access, open up a terminal and assume root access sudo -s

apt-get install mdadm

Now we create a single primary partition each of /dev/sda and /dev/sdb from sector 2048 to the end of the disk, for example using sudo fdisk. I also like to already set the partition type to fd for linux raid autodetection. The keystroke-sequence in fdisk (if the disk is emptyin the beginning, meaning no partitions) is n <return> p <return> 1 <return> 2048 <return> <return> t <return> fd <return> w <return>.

Now we create the mdadm volume:

mdadm --create /dev/md0 --bitmap=internal --level=1 -n 2 /dev/sd[ab]1

I noticed, that the ubiquity installer also does not quite manage to create partitions inside this /dev/md0, so I also did this by hand - again using fdisk. So on /dev/md0 create the following partitions:

/dev/md0p1 for your root filesystem, the size of course depending upon how much software you are going to install.
/dev/md0p2 for swap, the size of course also depending on what you use the machine for and how much ram it's got
/dev/md0p3 for /home, all the space that's left

After that we can begin the Installation. Make sure to start the installer from the terminal with the -b option, because installing the bootloader will fail anyway:

ubiquity -b

Make sure to go for manual partitioning and "use" the 3 partitions you just created and tick the format checkbox for / and /home so a filesystem will be created.

After the installation the system is not yet bootable, so do not restart the box right away. We need to chroot into the installed system and fixup some stuff:

sudo -s
mount /dev/md0p1 /mnt
mount -o bind /dev /mnt/dev
mount -o bind /dev/pts /mnt/dev/pts
mount -o bind /sys /mnt/sys
mount -o bind /proc /mnt/proc
cat /etc/resolv.conf >> /mnt/etc/resolv.conf
chroot /mnt
apt-get install mdadm
nano /etc/grub.d/10_linux  # change quick_boot to 0
grub-install /dev/sda
grub-install /dev/sdb
update-grub
exit

Now the newly installed system is ready to boot. Have fun!

I haven't tried, but just came accross http://www.salamander-linux.com/.

Salamander is a modified version of the default installer for Ubuntu Linux, Ubiquity. This modified installer allows users to easily install Ubuntu Linux onto a Software RAID array. No special hardware is required -- the Salamander installer can be used on any system with multiple hard disks.


How to remove Cinnamon etc. and leave just Ubuntu? I have Cinnamon and many more. How can I remove them and leave just Ubuntu?

Genrally I would do (replace cinnamon with the other desktop enviroments, e.g. kde4):

sudo apt-get remove cinnamon

then:

sudo apt-get autoremove

Go to https://help.ubuntu.com/lts/serverguide/apt-get.html and https://help.ubuntu.com/community/AptGet/Howto for more info.

I uninstalled cinnamon and when I restarted I had a computer, home & trash icon on my desktop.  what I did was I went into synaptic.  Make sure that you hit the all button to show  ALL of the residual and installed programs.  Search for cinnamon in the search bar. the installed programs will be green.  what you do is you right click and scroll to the bottom where it says complete removal. After checking all the green boxes hit the apply button. It may take some time but don't worry its working.  After that is done you will go to the bottom left and hit the status button and then above that scroll down to residual and click it.  you will then mark all of those for complete removal.  hit apply.  At this point you will have to restart your computer.  all of the residual information of cinnamon will be completely off and you will have your original desktop back.


Unable to boot LiveCD on an Atom N2600 Recently purchased a JetWay MiniITX PC which contains an Intel Cedar N2600 Atom Processor.

I'm attempting to boot off a Live USB with 13.10 64 bit (I've also tried 12.04 32 bit).

It starts booting, then stops outputting to the monitor, causing it to go into standby.

I've tried with nomodeset, no difference.

Create a new live USB using startup disk creator from ubuntu 12.04 if available.

Start with a new USB stick or erase an existing one first and format it with a FAT filesystem

Choose the ubuntu-13.10-desktop-amd64.iso

Choose your newly formatted USB stick

Choose when starting up from this disk Documents and settings will be discarded to avoid creating a persistence file.

Continue making the stick entering the root password when prompted to insure the boot loader is installed.

Eject the stick when complete using the appropriate button on the nautilus side panel.

Safely remove the stick by powering it down using the disk utility.

Insert the stick in an available USB port. Check your system manual for the key to choose boot device (Often F12)

Choose the USB stick you just created from the menu.

The system should boot. If it doesn't, contact Jetway for further assistance. There own product page indicates that you must be able to boot from a DOS partition To upgrade the BIOS so this should do the trick.

Be patient. The screen may blank and then return.

Full disclosure: I tested this process on an Acer D270 netbook which has the same processor. YMMV

Insure you have at least 2GB of available RAM for installing  ubuntu 13.10 64 bit

You appear to be having a problem with the video drivers based on the video from your phone in your comment. Lubuntu or Xubuntu might be a better choice for the limited capabilities of the cederview graphics.

source: http://ubuntuforums.org/showthread.php?t=2211217

Use actual version of Knoppix. I encountered similar problem with RescueCD (Gentoo based) on the same hardware platform (Atom N2600). Knoppix starts as live system without any problems. Next maintenance, eg. disk partitioning & installation to disk can be carried out.


How do I execute a file from a FAT USB drive? I'm trying to install a portable app onto my USB drive such that it is compatible with both Ubuntu and Windows (specifically, a program called eToys). Support is already built into the app for both operating systems - there's etoys.sh for Ubuntu and etoys.exe for Windows. I decided to install onto a FAT drive since that can be read from both systems. This works fine for Windows, but for some reason I cannot execute etoys.sh on Ubuntu.

The problem is not with the file - when the whole folder is copied to the local hard drive, the app works great in Ubuntu. But when I try to execute it from the USB, it opens the file in a text editor.

I then tried to run it from a terminal, but I got the message Permission denied.

I've had the same problem with other executables as well.

Is there an easy way to execute things from a USB stick?

Because of limitations of the FA32 file system, you can't.

Now, you can cheat:

either call sh etoys.sh instead of ./etoys.sh
if you want, you can even create another script (that would lie on your hard drive, for example) that simply calls your script on the USB drive:

#!/bin/bash
sh /media/USB/etoys.sh

If the syntax is bash...

bash yourscript


How do I unlock a microsd card? I have a locked microSD (locked by Nokia symbian phone), I forgot the password, how do I unlock it? I don't mind if I lost my data in microSD. I can't mount it.

Output of mkdir ~/sd_mount && sudo mount /dev/sdb ~/sd_mount and sudo fdisk -l:

Does gparted list the device?
If so and recovering the data is unimportant to you, or you fail doing so, you can format the drive to a suitable standard. For Unixoid systems as e.g. android this could be ext2/3 or a a universal standard NTFS or FAT 32. In the last case you should select yout format depending on the data you plan to save on the sd-card:
In case you don't intend to save files bigger than 4GB or the sd-card by itslef is limited to a memory of under 4GB you can select the simple FAT32, otherwise you should select NTFS. Ubuntu can handle both formats while windows will not recognize ext-filesystems.