Ubuntu freezes on login after prime-select intel I have an Asus GL553 with Intel 560 and Nvidia GTX 1050 and I'm tried to configure my hybrid cards with nvidia-prime.
I installed Ubuntu Gnome 17.04 then installed nvidia-381 and ran prime-select intel I had to hard reboot and when I tried to login the system freezes.
I have researched and read all these topics but I can't find a solution.

https://devtalk.nvidia.com/default/topic/991853/complete-freeze-with-nvidia-prime/?offset=8
https://devtalk.nvidia.com/default/topic/991853/complete-freeze-with-nvidia-prime/?offset=18
edited to: shutdown hangs on intel grapics on 16.04 with 4.7.2 kernel
NVIDIA-PRIME: Cant switch to intel
https://bugs.launchpad.net/lightdm/+bug/1637733
https://bugs.launchpad.net/ubuntu/+source/nvidia-prime/+bug/1663926

Has anyone could configure nvidia properly?

I finally did it.

1.- Make a folder to store the SSDT files. Then extract it from the ACPI tables (run this part as root):

# mkdir dsdt
# cd dsdt
# SSDT_FILES=`ls /sys/firmware/acpi/tables/ | grep SSDT`
# for file in $SSDT_FILES ; do cat "/sys/firmware/acpi/tables/$file" > "$file.dat"; done
# cat /sys/firmware/acpi/tables/DSDT > DSDT.dat

2.- Make sure you have IASL installed. On ubuntu, sudo apt install iasl should suffice. I downloaded the source and compiled it myself to get the latest version, but I don't think thats necessary.

3.- There's a duplicate definition in one SSDT file which won't let us dissassemble it. Find out which one it is and delete it:

# grep PRT0 *.dat
Binary file DSDT.dat matches
Binary file SSDT1.dat matches
# mv SSDT1.dat SSDT1.bak

So in my case it is SSDT1. Replace it with whatever you get. Do not touch DSDT.dat

4.- Next, we find the SSDT file with the code we need to change. We look for the file with both "NVID" and "OSYS" are present: (There's probably a better way to do this in grep)

# grep NVID *.dat
Binary file SSDT10.dat matches
Binary file SSDT3.dat matches
# grep OSYS SSDT10.dat
# grep OSYS SSDT3.dat
Binary file SSDT3.dat matches

So in my case it was SSDT3, if its different you replace all further instances of SSDT3 with whatever you get.

5.- Disassemble!

# iasl -e *.dat -d SSDT3.dat

6.- Hopefully you don't see any errors at this point. Replace all instances of OSYS except the declaration with the constant for Windows 7, and bump the definition block number by one:

# sed -i '/^ *External/! s/OSYS/0x07D9/g' SSDT3.dsl
# sed -i '/^ *DefinitionBlock/ s/0x00001000/0x00001001/g' SSDT3.dsl

If you have a different BIOS, the Definition Block number might not be 1000. Just open SSDT3.dsl in a text editor and look for DefinitionBlock. Whatever number you see on that line, increment it by one.

7.- Compile everything and hope there are no errors.

# iasl -ve -tc -p SSDT3 SSDT3.dsl

8.- Make an image:

# mkdir -p kernel/firmware/acpi
# cp SSDT3.aml kernel/firmware/acpi/ssdt3.aml
# find kernel | cpio -H newc --create > acpi_gpufix

8.- All the following instructions corresponding to Ubuntu and GRUB2. Copy it to the boot folder. the initrd.img it's your default img from boot folder:

# cp acpi_gpufix /boot/

you can permanently add it to your GRUB by editing /etc/grub.d/10_linux. I had to change the line initrd ${rel_dirname}/${initrd} to initrd ${rel_dirname}/acpi_gpufix ${rel_dirname}/${initrd}. Then run update-grub2.

UPDATE:
Now GRUB support extra initrd: GRUB_EARLY_INITRD_LINUX_CUSTOM=acpi_gpufix.img to your /etc/default/grub

9.- To check if it works:

$ dmesg | grep ACPI | grep override
[    0.000000] ACPI: Table Upgrade: override [SSDT-PegSsd- PegSsdt]
[    0.000000] ACPI: SSDT 0x000000007A715080 Physical table override, new table: 0x0000000079493000

Now you can change the GPU wihtout freezes

source:

https://github.com/Bumblebee-Project/Bumblebee/issues/764#issuecomment-306543064
https://devtalk.nvidia.com/default/topic/1012369/linux/laptop-freezes-changing-video-cards

A long ago i used to have an nvidia laptop,  and have similar issues with gnome. The only that worked for me was to uninstall gnome and used KDE  instead.  But i repeat that was long ago 10~ version i guess.

You can start on command mode to do that:

To boot into single user mode you edit the boot instructions for the GRUB menu entry you wish to boot and add the kernel parameter/option single. Brief instructions for how to do this are below.

Hold down the left Shift key while rebooting to bring up GRUB menu
Select (highlight) the GRUB boot menu entry you wish to use.
Press e to edit the GRUB boot commands for the selected boot menu
entry.
Look near the bottom of the list of commands for lines similar to

linux /boot/vmlinuz-3.2.0-24-generic root=UUID=bc6f8146-1523-46a6-8b\
6a-64b819ccf2b7 ro  quiet splash
initrd /boot/initrd.img-3.2.0-24-generic
Change the middle line in (4) by adding the kernel boot parameter
single to the end of the line (i.e. after ro  quiet splash).

For this example you would change:

6a-64b819ccf2b7 ro  quiet splash

to

6a-64b819ccf2b7 ro  quiet splash single

Press either Ctrl+X or F10 to boot using these kernel options.

Note: These changes are not persistent. Any change to the kernel boot options made this way will only affect the next boot and only if you start that boot by pressing either Ctrl+X or F10 while still in GRUB edit mode.


Run a shell script from another script concurrently in a new terminal window I'm trying to run a shell script from another and make them display each script's output in a separate terminal window but I cannot. When I run script1 it runs fine and then calls script2 using source so that I have access to the variables in script1 but after script2 is called I lose the output of script1 on terminal. Any advice how to open a new terminal for script2 once it's called and then script1 continue what's it's doing without waiting for script2 to finish so that they can run both in separate windows?

This is script1:

#!/bin/bash -i
#

alias brc='source ~/.bashrc'
id='myapp1*'

dir_list= a directory list I have

only_once=0

select dir in $dir_list; do
    dir1= My directory 1
    while :; do
        echo "#### entered while ####"
        #here I do my operations

        if [ $only_once -eq 0 ]; then
            echo "entered"
            source path to my script2
            only_once=$((only_once+1))
        fi

        sleep 5m
        echo ""
    done
    break
done

And this is script2:

#!/bin/bash -i
#
echo $id
newdir= get a specific directory here
echo $newdir
cd  $newdir
for f in ./Myapps_*
    do
        cd ./$f/Data
            for i in *.app
                do
                    echo "############################"
                    echo "Fetchingggg" $i

                        echo "############################"
                done
        cd ../../
    done

Tried increasing the buffer on your terminal?

In terminal edit>profiles>edit>scrolling tab


Download a file over an active SSH session I want to download a file from an active SSH session. In many cases I probably could just use SFTP, scp, rsync et al but there are times where I have elevated permissions on the remote server in a way I cannot use these methods.

If you're struggling to understand what I mean, imagine that you wanted to download something from /root/ or /var/log/auth.log. Root login is disabled (because we're not idiots). How do you get that file? Copy it out somewhere less protected and then move it? This is clunky. There are also scenarios where the remote path is complex or temporary, or isn't even a path because I want the output of a remote command stored locally. Store remotely, then copy? Clunk!

There are several more clunky ways to achieve versions of these but in an ideal world, I would have something akin to local write access from the remote server, using the existing SSH session as a conduit. Something like (this is just an artist's impression):

$oli@remote: cp /root/cheesecake /local/

And it just appears in my local cwd. And bidirectional access wouldn't be a bad thing.

It's been eight long years since I asked this question and we've seen a real range of clunk, but it remains a problem that I still struggle with occasionally.

I've refactored the question into something a lot more idealistic. I fully understand that there may not currently be a perfect answer. All past and future efforts towards my ideal are appreciated.

You may want to check out zssh, which is available in universe, and therefore available with

sudo apt-get install zssh

You need it on your ubuntu server and on your client, but basically when logged in with zssh, you just hit 'ctrl-@' and it brings up the "File transfer mode" which allows you to send files back down the pipe to your client machine, or upload them from client to server.

However, you don't have to re-auth or open a new window to scp.

If you're using ssh keys, and an ssh agent, you can quite easily do:

[enter]~[ctrl]-Z

Which will background ssh, and then just scp $!:/whatever/whatever .'

Once the file is transferred, fg to get ssh back.

If you aren't using ssh keys, you can still use the "ControlMaster" and "ControlPath" options added to recent OpenSSh versions, but that gets tricky, check man ssh_config

WAY overthinking this, folks.  I was looking for all the deep, dark, complex answers too.  It turns out, you can do this right from Dolphin straight out of the can.  fish://username@server:port


LAMP Server with multiple PHP Versions I am looking for a way to install multiple versions of PHP on my notebook to work on different projects that require different versions of PHP.

I have Ubuntu 13.10 and installed apache2, php5, mysql etc from the repository. I have now PHP 5.5 installed, and I would like to have also PHP 5.3 for some projects that don't work well with PHP 5.5.

So I need a way to have multiple versions of PHP installed on my system and switch between them depending on the project I'm working on, or better configure the vhost to use the chosen version.

You can do this if you compile both Apache and PHP from source code instead of installing via aptitude. This may be a tedious process for you if you're a beginner. You also need to have Apache listen to port other than 80 if you want your two PHPs requests at the same time.

You can set the php version in the file named .htaccess (one htaccess for each website with the php version of your choice)
http://sourcelibrary.org/2011/04/13/linux-enabling-use-of-apaches-htaccess-files/


Watching Netflix in Chrome on Ubuntu 13.10 So I know how to get Netflix Desktop and watch Netflix via Firefox.  However, I have a Google Chromecast and like to stream Netflix to my TV.  In order for me to do this, I have to be watching Netflix IN CHROME.  I have yet to find a way that actually works to get Netflix streaming in Chrome on Ubuntu 13.10.  Does anyone have any insights?

Pipelight is one of the more popular solutions and my chosen one, but it will not work with chrome versions newer that version 34. From version 35 onward chrome has dropped support for the netscape plugin api, which is the api that pipe light uses. Chrome now only supports the pepper plugin api, so I am not sure that you are going to be able to find anything to make it work unless the pipe light developers decide to support the pepper api which is unlikely and netflix will hopefully be switching away from silverlight in the near future.

I know that isn't what you wanted to hear and isn't really a solution, but I thought that information might be useful.

The only thing that MIGHT work would be to run a windows version of chrome under WINE, but I'm not even sure if that is possible and it probably wouldn't run very well if at all.

I haven't try this but hope it helps you, que guide is a little long and detailed so I recomend you to read once ot twice before tryin it.

Pipelight is project that brings Silverlight to any Linux browser that supports the Netscape Plugin API. Using it, you can use services that require Silverlight, such as Netflix, in native Linux web browsers like Firefox, Chrome or Midori.

http://www.webupd8.org/2013/08/pipelight-use-silverlight-in-your-linux.html


What are the advantages and disadvantages of using 15.10 over 14.04? I know that Ubuntu 14.04.3 LTS comes with five years of security and maintenance updates, guaranteed, and that 15.10 only had nine months of support.

Why would you chose 15.10 if it will be unsupported soon? What are the benefits of 15.10?

LTS is long term support - as you say it has 5 years of updates and will have reached 14.04.5 by the time it is end of life.

However, because the developers are focusing on stability and reliability (especially for business users who rely on their networks working), they don't add masses of features. Early on their is a feature freeze and they make sure there are no bugs.

This means that Ubuntu 14.04 is less cutting edge - both because it was released in April 2014, 1.5 years ago, and because it was never intended to be chock full of features.

Ubuntu 15.10 on the other hand has had new features added to it, including the following:

  Unity polish and fixes
  Steam controller support
  New scrollbars Linux
  Kernel 4.2 Updated apps, including LibreOffice 5
  Ubuntu Make update
  Python 3.5 Support

But this will only be supported for the next 9 months. Why? In 6 months there will be another release - 16.04 (an LTS release, incidentally), which you will be able to update to.

Updating every 6 months is a hassle - but that's the price you pay for latest features.

So which is better depends on what you need. If you want the latest features - and don't mind 6 monthly updates then go for the latest release.

If you want to know that you will have a system that works and is secure for the next 5 years then go for 14.04 (what I have)

If you are planning to update to 16.04 when it's released, you may as well get 15.10. But from there it's your choice to update to 16.10 if you want the latest features, or stay at 16.04 for stability and support.

Also note that here on Ask Ubuntu, we only offer answers to Ubuntu version that are currently supported - another reason to stay with a version that is current. If you are worried you won't want to update that frequently, it's better to get an LTS release - then there is no danger of it not being updated.

It's your opinion. If you have a slower computer that might not be able to keep supporting newer systems, I would go with 14.04.3, like mine. But if you have a faster computer that can hold up with more updates, going to 15.10 and keep updating might be best, as you can keep more updated. But like I said, it is your opinion.


How do I create a .deb file? Yes, I know that this question has been asked many times before, but none of the answers really helped.
I'd like to package the Minecraft launcher (which has no proprietary code, AFAIK,) into a .deb file so that I can put it on a flash drive and share it with my friends. I have managed to install Minecraft it manually (put some files into /opt/minecraft, download an icon, and create a .desktop file in /usr/share/applications,) and I have made a shell script that completely automates the process, but it relies on wget to retrieve a few files, including the .desktop file. (It isn't a self-extracting archive, after all.)

I'd like to be able to do this offline, as a lot of my friends have slow or no internet. (One of their internet lines was buried so shallowly that it actually got knocked out by the lawnmower.)
I won't be loading it into a PPA or anything like that; I just want it to be a "formal" package that can be easily installed and uninstalled. (One thing that I would like is for sudo apt-get purge minecraft to also remove the .minecraft folder. It would also be nice to define the dependedcies as being able to accept OpenJDK or Sun's JVM.)

Oh, just so you know, the Minecraft launcher is a .jar file, but I can very, very easily launch it via shell scripts. The exact command is right on the download page.

I can feel your pain. Some time ago I asked myself the same question just trying
to package a little shell script with a launcher. The best I could find was this
video (can't remember the original file name - so I had to upload it to
U1). Following the steps in the video I was able to create a .deb in ~2 hours.

Other helpful resources (just quickly scan through it):
Ubuntu Forum
Package Basics

All the tutorials I could find were much, much too long, incomplete, or not usable
for a beginner (too complicated.) I'm sure there are a lot of people out there
that have written little useful scripts and would like to package and share them
but its just to time consuming & frustrating when trying to create a .deb for
the first time.

When you've built your application using Apache's Maven (best thing to do btw), you can use the pkg:pkg plugin from Tarent.  You can find this open source package here: https://evolvis.org/projects/mvn-pkg-plugin.

A tutorial is available.  One on an older version is here.


Image from webserver is not shown in web browser I am new to Ubuntu and recently I installed xampp 1.8.1 on my Ubuntu 12.10. My problem is that image from server can not be shown. My code is

Unsung heroes...

Here, in my address bar I use
 http://localhost/madeTemplet/basicTemplet/templet03.html

and I want to show image after 'Unsung heroes' text but it only shows some link and no image.
But when I use the following
 file:///opt/lampp/htdocs/madeTemplet/basicTemplet/templet03.html

images are shown after 'Unsung heroes' text.
It works well on Windows platform.
As a new user, I have very little knowledge about file permissions, chmod, chown etc. I use ls -l in my terminal window in /opt/lampp/htdocs/madeTemplet/basicTemplet/_images directory, and I see this:
sabbir@sabbir-pc:/opt/lampp/htdocs/madeTemplet/basicTemplet/_images$ ls -l
total 300
-rw------- 1 sabbir sabbir 204067 Feb 24  2010 1_full.jpg
-rw------- 1 sabbir sabbir  75789 Nov 13  2009 2d7y3ki.jpg
-rw------- 1 sabbir sabbir  23692 Apr 21  2010 6AB32AE44600435B9DE0FB5EBA24A912.gif

I also go to
/opt/lampp/etc/httpd.config

to find EnableMMAP off and  EnableSendfile off which is already # off.
How to solve this problem?

I can see your files with read write permissions JUST for the owner but not to the group or other (world universe).
Try the next in a terminal:
sudo chmod 775 -R /opt/lampp/htdocs/madeTemplet/basicTemplet/_images

This will provide read permissions for the world universe of users, this way you will be able to see the files without problem when browsing in a localhost environment or the net.
The reason because of the files and images are properly shown when you run file:///opt/lampp/htdocs/madeTemplet/basicTemplet/templet03.html is because of the owner of the files is allowed to read/write over them. But the rest of the people won't be able to reach certain files that won't meet the requirements for worldwide access.
Additionally, you may need to assign anonymous read permissions to the folder where the files resides by running sudo chmod 775 /opt/lampp/htdocs/madeTemplet/basicTemplet/_images -R
-R = Recursively: All the files/folders inside will also be affected.
Please give this a try and let us know if this is doing the work for you, if you need further assistance don't hesitate to let us know by dropping a message and the contents of this answer may be changed or deleted depending on your results.
Good luck!

You should not assign execute permissions to files.
You should not recursively assign 775.

If you are going to do the above, instead do this:

find /opt/lampp/htdocs/madeTemplet/basicTemplet/_images -type f -exec chmod 644 {} \;

or

find /opt/lampp/htdocs/madeTemplet/basicTemplet/_images -type f -exec chmod ugo+r {} \;

I once worked with someone who had a habit of telling people to cd to a directory and recursively chmod 777 things, but one day the person he was telling to do it forgot to say the cd command had returned the message "directory not found" and so he borked the whole server.


Unable to mount Internet Manager ZTE MF-195 USB wireless modem I just got this ZTE MF-195 USB wireless modem, and when I plug it in I get this message:

Unable to mount Internet Manager
Error mounting: mount: /dev/sr0 already mounted or /media/Internet Manager busy

The results of running lsusb are:

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 003: ID 147e:2016 Upek Biometric Touchchip/Touchstrip Fingerprint Sensor
Bus 001 Device 004: ID 04f2:b25f Chicony Electronics Co., Ltd
Bus 001 Device 005: ID 0a5c:217f Broadcom Corp. Bluetooth Controller
Bus 003 Device 005: ID 19d2:1514 ZTE WCDMA Technologies MSM
X1:~$  dmesg | grep tty
[    0.000000] console [tty0] enabled
[    1.019341] 0000:00:16.3: ttyS4 at I/O 0x50b0 (irq = 19) is a 16550A

...so my device is Bus 003 Device 005: ID 19d2:1514 ZTE WCDMA Technologies MSM.

What should I do?

I've had trouble with usb 3g internet sticks on linux before and got it working using sakis3g. Give it a try!

https://github.com/Trixarian/sakis3g-source

I would suggest using a precompiled copy of sakis3g. The current source code doesn't compile on all version of Ubuntu - especially since usb_modeswitch moved to using libusb1.

Try grabbing the copy I have @ http://trixarian.net/sakis3g.gz


Is aptitude still considered superior to apt-get? When I first started with Ubuntu using aptitude was the 'in-thing', with some stated improvements over apt-get. Am I correct in saying that apt-get has now 'caught up' with aptitude, and it makes little difference which is used (although it is preferable to choose one or the other, and stick with it)?

Moreover, with aptitude set to be removed from a default Ubuntu install, should everyone revert to apt-get, especially when guiding new users interested in the CLI?

As far as I can see, in 10.04, the main differences between aptitude
and apt-get are:

aptitude adds explicit per-package flags, indicating whether a
package was automatically installed to satisfy a dependency: you
can manipulate those flags (aptitude markauto or aptitude unmarkauto) to change the way aptitude treats the package.

apt-get keeps track of the same information, but will not show it
explicitly. apt-mark can be used for manipulating the flags.
aptitude will offer to remove unused packages each time you
remove an installed package, whereas apt-get will only do that if
explicitly asked to with apt-get autoremove or specify --auto-remove.
aptitude acts as a single command-line front-end to most of the
functionalities in both apt-get and apt-cache. Note: As of 16.04, there is an apt command that includes the most commonly used commands from apt-get and apt-cache and a few extra features.
In contrast to apt-cache's "search", aptitude's "search" output
also shows the installed/removed/purged status of a package (plus
aptitude's own status flags).  Also, the "install" output marks
which packages are being installed to satisfy a dependency, and
which are being removed because unused.
aptitude has a (text-only) interactive UI.

I personally use only aptitude for my command-line package
management (and I never use the text UI); I find its output more
readable than apt-get/apt-cache.

However, if aptitude will be no longer standard on Ubuntu, there's
no other choice than use apt-get in instructions and how-to
documents.

(Personally, I'm rather disappointed to see it go away in 10.10;
especially since the improvements of aptitude over apt-get are
mostly on the usability side.  I guess they deemed that those
conversant with the command-line know how to get aptitude back, and
those who don't use the command-line will not care...)

On a server I prefer Atitude because it comes with a pretty good interface to check package changelogs, selective upgrades and that kinds of stuff. apt-get is more quick though and I always use that if I just want to update everything without too much hassle.


Multiple users on the same machine on the same time I have a very powerful computer that is running Ubuntu 18.04.2 LTS (Bionic Beaver). And i want to use this computer with my colleagues in the same network at the same time using screen sharing (each person has different users and different screens at the same time). I managed to install vino and connect the computer remotely with remmina but how can i do this with multiple users at the same time?

Here are the things worked for me.. (success using this tute  http://www.howtoforge.com/how-to-install-vnc-server-on-ubuntu-14.04 and kudose for Charles Tassell for right directions and advice)

What I did is as follows,

(1) run sudo apt-get update && sudo apt-get upgrade

(2)run sudo apt-get install gnome-core xfce4 vnc4server

(3)then add users (vncserver/unix)

sudo adduser test1

(you will have to fill details afterwards for the user, I have added 3 users (test1, test2, test3 etc for vnc server)

(4)Then you have to switch users one by one and run vncserver and add password for vncuser login (I have three vnc users, so that i had to repeat this for all three user test 1, test2, test3)

su - test1

then run

vncserver

out put will be like this prompting for a vnc password..

You will require a password to access your desktops.

Password:
Verify:

xauth:  file /home/test1/.Xauthority does not exist
New 'server1:1 (test1)' desktop is server1:1
Creating default startup script /home/test1/.vnc/xstartup
Starting applications specified in /home/test1/.vnc/xstartup
Log file is /home/test1/.vnc/server1:1.log

(5) Important : you will have to replace /home/test1/.vnc/xstartup content with below (Else you will not get the desktop, instead you will stuck with blank screen without user interfaces or menus )

vim /home/test1/.vnc/xstartup

and add

#!/bin/sh
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
startxfce4 &

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &

(6) startup script for the vncserver was created using "Further I will make the startup script for the vncserver like this" section of this tute

sudo vim /etc/init.d/vncserver

and add below content..

#!/bin/bash

unset VNCSERVERARGS
VNCSERVERS=""
[ -f /etc/vncserver/vncservers.conf ] && . /etc/vncserver/vncservers.conf
prog=$"VNC server"
start() {
 . /lib/lsb/init-functions
 REQ_USER=$2
 echo -n $"Starting $prog: "
 ulimit -S -c 0 >/dev/null 2>&1
 RETVAL=0
 for display in ${VNCSERVERS}
 do
 export USER="${display##*:}"
 if test -z "${REQ_USER}" -o "${REQ_USER}" == ${USER} ; then
 echo -n "${display} "
 unset BASH_ENV ENV
 DISP="${display%%:*}"
 export VNCUSERARGS="${VNCSERVERARGS[${DISP}]}"
 su ${USER} -c "cd ~${USER} && [ -f .vnc/passwd ] && vncserver :${DISP} ${VNCUSERARGS}"
 fi
 done
}
stop() {
 . /lib/lsb/init-functions
 REQ_USER=$2
 echo -n $"Shutting down VNCServer: "
 for display in ${VNCSERVERS}
 do
 export USER="${display##*:}"
 if test -z "${REQ_USER}" -o "${REQ_USER}" == ${USER} ; then
 echo -n "${display} "
 unset BASH_ENV ENV
 export USER="${display##*:}"
 su ${USER} -c "vncserver -kill :${display%%:*}" >/dev/null 2>&1
 fi
 done
 echo -e "\n"
 echo "VNCServer Stopped"
}
case "$1" in
start)
start $@
;;
stop)
stop $@
;;
restart|reload)
stop $@
sleep 3
start $@
;;
condrestart)
if [ -f /var/lock/subsys/vncserver ]; then
stop $@
sleep 3
start $@
fi
;;
status)
status Xvnc
;;
*)
echo $"Usage: $0 {start|stop|restart|condrestart|status}"
exit 1
esac

to make it an executable run the following..

chmod +x /etc/init.d/vncserver

(7) To make vnc desktop sessions allocated for users at start up automatically, create following script in /etc/vncserver

sudo mkdir -p /etc/vncserver
sudo vim /etc/vncserver/vncservers.conf

add this in vncservers.conf (this is because i have my users as test1, test2, test3 change it according to )

VNCSERVERS="3:test3 2:test2 1:test1"
VNCSERVERARGS[1]="-geometry 1024x768"
VNCSERVERARGS[2]="-geometry 1024x768"
VNCSERVERARGS[3]="-geometry 1024x768"

(8) Then run

sudo `update-rc.d vncserver defaults 99`

(9) reboot server (you are almost done by now) step 10 and the rest is how to login part

(10)download http://www.realvnc.com/download/viewer/

enter servername/ipaddress and session id
for example my server is 172.16.70.17 and if i use 172.16.70.17:2 it will login to test2 user desktop.. and 172.16.70.17:3 will login to test3 user desktop like wise

make sure encryption to be selected "Prefer off"

http://i.stack.imgur.com/MQ36F.png

http://i.stack.imgur.com/tmMoc.png

Then you can access your desktop and applications in this manner..

http://i.stack.imgur.com/rN7UK.png


How to connect WebCamStudio output to VLC media player (as an input) I am a videographer and occupational therapist. I am willing to do webcasts of patients' leissure activities (drama, music, etc.) to improve their health.

In order to do this I want to have a good RTMP streamer. The only such streamer that I found for Ubuntu was VLC media player. But its capacity to change a live video is low. WebcamStudio is sufficient. But it cannot stream an RTMP stream. So how do I connect WebCamStudio with VLC media player or stream RTMP with WebCamStudio?

you can find an answer going to G+ WebcamStudio community here :

https://plus.google.com/communities/110329269823088092206

Karl.


Preseed late_command not running I must be missing something obvious.  I've taken over the development of a customised Ubuntu installation, which uses the 11.04 Desktop Live ISO with a customised preseed file to make the installation of a new PC completely automatic - build the ISO with the UCK tools, burn it to a DVD, boot a PC from the DVD, go for a nice cup of tea, and come back to a finished installation just waiting for you to click to reboot into the new system.

It all works fine except for this: I cannot get a late_command in the preseed file to run.  Everything else in the file works fine - partitioning, choosing packages, creating a user, etc - but the last line of the preseed file:

d-i preseed/late_command string /bin/echo "trying echo" > /var/log/myfile

...doesn't happen.  I've tried every possible combination of in-target and prefixing /target/ to my paths.  I've SSHed to the machine while the automated installation is running and verified that my output paths exist and are writable.  I've checked the kernel command line to make sure the right preseed file is being used.  My late_command command just sits there, refusing to be run.  We've been sitting here staring at each other, for quite some time now.  My brain has started dribbling out my ears, and I've just plain started dribbling.

Is there some crucial piece of ancient Oriental preseed-fu I'm missing?  I'm at my wits' end here (and my mum will tell you I didn't have far to go) - any help will be most appreciated.

If you're using the desktop installer (aka Ubiquity), you may try putting your late_command under

ubiquity ubiquity/success_command string

like

ubiquity ubiquity/success_command string /bin/echo "trying echo" > /var/log/myfile

I usually put both this and the d-i stanza, just to make sure my preseed file works on both.

The right one string is

ubiquity ubiquity/success_command string in-target /bin/echo "trying echo" > /target/var/log/myfile


language learning on ubuntu tablet I have a linux computer, but i use an android tablet. On my tablet i have a series of apps for learning french and spanish. My favorites are the "fun easy learn" apps which lets you memorize words. But i also use apps to help with verb conjugation. My question is this: will there be more language learning apps in the ubutnu app store for tablets?

My other uses for the tablet are listening to podcasts and radio, and watching netflix. I dot not write longer texts on the tablet.

For the phone, my favorite feature is the hotspot function which lets me use the phone as a router. Call blocking and recording conversations are essential because of the many telemarketers.

For language learning, I have found Anki very useful, which works on a variety of platforms, including Ubuntu. It is based on a technique called spaced repetition and, although not the best exponent of "fun" it is definitely "easy learn".

It works for many other fields, not just languages.


Where can I find the correspondent of "temp" folder in Firefox? If I'm right, if I play a video on Youtube, when I'm using Firefox on a Windows machine, the browser stores the video file in the temp folder. So, theoretically, I should find that video already downloaded in the temp. But I don't know how to find in Linux the correspondent of the "temp" folder. I have tried in the "etc" folder but got nothing useful. Do you have any ideas how to sort this out?

Yesterday I have been playing a video on Youtube all day long, and now I see it's gone "for copyright infringement, blah-blah", but I think the played file should be "hiding" somewhere on my system, only if I could get to it somehow... Can you help me with this?

You can put about:cache in the location bar, it should display where it keeps the "temp" folder.

I think you are looking for the Firefox temporary files download directory.
Just try looking into:

/tmp/mozilla_username

username = your Linux username


Kde network notification on start-up at center I have installed Kubuntu 13.10 and after i login it show me a kde network notification on top-center screen. How can i disable or adjust this inconvenience. Here is a screenshot:

Same here. Logging out and back in makes the message appear where it should. This problem seems to exist only a first login.


How do I clear all gnome shell notifications? I use Jupiter as a power manager. Now I get a good number of notifications from it. I do not have problem with the fact that I get all these notifications.

I do however, want to be able to clear all gnome shell notifications with a few clicks. Currently, my entire bottom edge of the screen is filled with notifications and I do not wish to clear each item one by one.

So my question is, how do I clear these notifications? If this is not possible in the ui, is it possible to write an extension to do it? Where should I suggest this feature to gnome developers? Gnome forums are almost dead now, the administrator has not activated my created account since 5 days!

Shamelessly using this workaround from the Fedora forums here.

You can reset the gnome-shell by typing Alt+F2, entering r and hitting enter. This resets/restarts the GNOME Shell and so clears all notifications.

Click on any notification and it will disappear unless it has menu of its own (informational versus minimized app).


Unable to add ppa repository When I am trying sudo add-apt-repository --yes ppa:persepolis/ppa
its showing

Hit:1 http://ppa.launchpad.net/persepolis/ppa/ubuntu bionic InRelease
Get:2 http://security.ubuntu.com/ubuntu bionic-security InRelease [83.2 kB]
Hit:3 http://in.archive.ubuntu.com/ubuntu bionic InRelease
Get:4 http://in.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Ign:5 http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu bionic InRelease
Err:6 http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu bionic Release
  404  Not Found [IP: 91.189.95.83 80]
Hit:7 http://in.archive.ubuntu.com/ubuntu bionic-backports InRelease
Reading package lists... Done
E: The repository 'http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu bionic Release' does not have a Release file.
N: *****Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.***** .

please Solve this!!

The ubuntu-wine ppa doesn't exist for Bionic so you can expect problems if you try to use it.

Call up Software and Updates and click on the "Other Software" tab. Find ubuntu-wine in the list and un-check all places it is found.  Then click Close, and enter your password when asked.

You have problems with a Wine repository, apparently the server is down or no longer exists.
It is telling you that it can not connect to the IP
I follow you follow the direct indications from the Wine website.
https://wiki.winehq.org/Ubuntu


Port Forwarding to Windows Desktop from Ubuntu Laptop? I currently have a weird setup. I forgot to get a wireless card for my Windows 10 desktop so I am currently sharing my Ubuntu laptop's wireless internet with my Windows desktop via ethernet cable.

I am trying to get my Desktop to have an open NAT type for a game. I'
ve forwarded the correct ports to my Ubuntu laptop through my router but I don't really know how to forward them through my laptop to my desktop.

Could anyone suggest some reading I could do in order to figure out how to do this or help with any pointers? Thank you.

So, the issue is you need to forward ports between your Ubuntu laptop and Windows computer? If so, you could try using SSH. Install openssh-server on your laptop and an SSH client on your Windows. Then use the SSH client to connect to your laptop and handle the port forwarding.

Disclaimer: I have no idea if this is the most efficient way of doing it. I am just making a suggestion since no one else has answered yet.


Why do I have "Unassigned class [ff00]: Realtek Semiconductor"? It seems that everything in my Ubuntu is working properly. I just noticed that when I use
lspci

The last three lines are,
01:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8188EE Wireless Network Adapter (rev 01)

05:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL810xE PCI Express Fast Ethernet controller (rev 07`)

06:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5229 PCI Express Card Reader (rev 01)

Why does the last line say "Unassigned class [ff00]" ? Is there anything that I need to install or assign?

Try something as simple as:
modprobe -r rtsx_pci
modprobe rtsx_pci

This is because rtsx_pci module manages the card reader. Sometimes it doesn't work properly on boot.

There is nothing to worry about. This PCI device is a Card reader.
There is no special class for these devices in PCI, so it is shown as  Unassigned class.


Updating variables in my.cnf I set lower_case_table_names = 2 in /etc/my.cnf file. I also updated this variable in /etc/mysql/my.cnf file. After setting the variable I restarted mysql server, but still the value is 0, when I use SHOW VARIABLES.

I'm using MySQL 5.5. Any Ideas what else needs to be done?

UPDATE

my.cnf content:-

#
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html

# This will be passed to all mysql clients
# It has been reported that passwords should be enclosed with ticks/quotes
# escpecially if they contain "#" chars...
# Remember to edit /etc/mysql/debian.cnf when changing the socket location.
[client]
port        = 3306
socket      = /var/run/mysqld/mysqld.sock

# Here is entries for some specific programs
# The following values assume you have at least 32M ram

# This was formally known as [safe_mysqld]. Both versions are currently parsed.
[mysqld_safe]
socket      = /var/run/mysqld/mysqld.sock
nice        = 0

[mysqld]
#
# * Basic Settings
#
lower_case_table_names = 2
user        = mysql
pid-file    = /var/run/mysqld/mysqld.pid
socket      = /var/run/mysqld/mysqld.sock
port        = 3306
basedir     = /usr
datadir     = /var/lib/mysql
tmpdir      = /tmp
lc-messages-dir = /usr/share/mysql
skip-external-locking

#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address        = 127.0.0.1
#
# * Fine Tuning
#
key_buffer      = 16M
max_allowed_packet  = 16M
thread_stack        = 192K
thread_cache_size       = 8
# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched
myisam-recover         = BACKUP
#max_connections        = 100
#table_cache            = 64
#thread_concurrency     = 10
#
# * Query Cache Configuration
#
query_cache_limit   = 1M
query_cache_size        = 16M
#
# * Logging and Replication
#
# Both location gets rotated by the cronjob.
# Be aware that this log type is a performance killer.
# As of 5.1 you can enable the log at runtime!
#general_log_file        = /var/log/mysql/mysql.log
#general_log             = 1
#
# Error log - should be very few entries.
#
log_error = /var/log/mysql/error.log
#
# Here you can see queries with especially long duration
#log_slow_queries   = /var/log/mysql/mysql-slow.log
#long_query_time = 2
#log-queries-not-using-indexes
#
# The following can be used as easy to replay backup logs or for replication.
# note: if you are setting up a replication slave, see README.Debian about
#       other settings you may need to change.
#server-id      = 1
#log_bin            = /var/log/mysql/mysql-bin.log
expire_logs_days    = 10
max_binlog_size         = 100M
#binlog_do_db       = include_database_name
#binlog_ignore_db   = include_database_name
#
# * InnoDB
#
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
# Read the manual for more InnoDB related options. There are many!
#
# * Security Features
#
# Read the manual, too, if you want chroot!
# chroot = /var/lib/mysql/
#
# For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
#
# ssl-ca=/etc/mysql/cacert.pem
# ssl-cert=/etc/mysql/server-cert.pem
# ssl-key=/etc/mysql/server-key.pem

[mysqldump]
quick
quote-names
max_allowed_packet  = 16M

[mysql]
#no-auto-rehash # faster start of mysql but no tab completition

[isamchk]
key_buffer      = 16M

#
# * IMPORTANT: Additional settings that can override those from this file!
#   The files must end with '.cnf', otherwise they'll be ignored.
#
!includedir /etc/mysql/conf.d/

As you can see in the file there are multiple places where config files are also loaded.

!includedir /etc/mysql/conf.d/:
Check every file in this directory if the setting is overwritten by one:

grep -i lower_case_table_names /etc/mysql/conf.d/*

or check the files manually and search for the config value.

# - "~/.my.cnf" to set user-specific options.: Check the .my.cnf of the user that runs the mysql daemon, maybe there is this setting overwritten.

Find out the uid of the user with:

ps -ef | grep mysql

The first row is the uid. Find the user's home directory with:

grep <uid> /etc/passwd

the 6th :-separated string is the home directory. When in this directory is a .my.cnf, this file is loaded.

Stop the mysql daemon with /etc/init.d/mysql stop. And check if the daemon is stopped with pgrep mysql and pgrep mysqld. If the pgrep commands still return pids then kill those pids with kill. Sometimes mysql needs a very long time to stop with huge databases, thats normal. So first wait before killing things.

If you are sure mysql is stopped and all config files are cleaned from this config value, then start mysql again with /etc/init.d/mysql start and check the value.

For those using Windows with the Workbench 6.1, here's how I found to make this work.  Select your schema and in the query box, enter:  set global max_allowed_packet = 1073741824. You can use a lower number, but it must be a multiple of 1024.  This is the largest value allowed (1 gig).  Once you do this, SHOW VARIABLES doesn't show the change :(, but apparently, it does change.  Immediately (may not be necessary) after executing the above statement, go to Server/Import.  The error "... 9932: MySQL server has gone away" no longer comes up.


How to recover files and folders from /tmp? I am new to Linux and Ubuntu. I mistakenly placed my backup into the /tmp folder and now when I try to move those files to /home using cp -r, I lost everything in my /tmp.
The command I used was:
cp -r /tmp /home

Please help me recover my files.

Try to use some recover tools like Testdisk or PhotoRec .
TestDisk can recover lost partitions of virtually any filesystem. PhotoRec can recover files of most types, including most picture and video formats. PhotoRec can be used on existing partitions, or can be used to recover files on deleted partitions without having to recover the underlying partitions.
Possible setups for recovery include:
Recover the files to a separate hard drive.
Recover the files to a networked storage drive.
Recover the files to a separate partition on the same hard drive.
Image the hard drive using a tool like ddrescue and recover files using only one partition.

Download them here, both tools are in the same package.
Install the package and try your luck, I hope you can recover your lost files.
Reference

If you run cp -r /tmp /home command with superuser privileges(sudo), your /tmp directory must be inside /home directory (/home/tmp). You can access the files by cding into /home/tmp directory  or you can move to that directory through nautilus.

Once you find the files, copy those to any other location and then restart your PC.


Ubuntu 15.10 freezes on viewing YouTube video on full screen using Google Chrome The case:

Launch Google Chrome.
Open YouTube video using the 720p resolution with 60 fps.
Make it full screen.
Use the "system volume up" hotkey.

After step 3 the video is frozen, but sound continues to play. I can only open console using "CTRL+F1" hotkey and reboot the PC.

Another unstable case, that brings the same result:

Launch Google Chrome.
Open YouTube video using the 720p resolution with 60 fps.
Make it full screen.
Exit full screen.

I'm using Intell HD Graphics with new drivers, but the same case was when I used default Ubuntu's driver.

The Google Chrome version: 49.0.2623.87 (64-bit)

The same situation repeats on three different PCs. These cases do not repeat on Firefox.

Can someone confirm the same bug on his PC? Is there some way to resolve (or temporarily resolve) this problem?

I've found a lot of similar situations, but not the same. The fix, like using BETA version of Google Chrome does not help here. The fix with disabling "Override software rendering list" in chrome://flags also does not help.

In my case, the disabling the flag "Use hardware acceleration when available" in Settings -> Advanced Settings -> System fixes the problem. The full answer, which has helped me is here. But, I think, this is a temporarily solution.

UPDATED. On Ubuntu 16.04 this bug has been fixed.

Oh!! You have the same problem as mine!
Solution:
If it freezes:
Force-restart your computer. You can do that by pressing and holding the power button on your device until it shuts down, then turning it on again.
To avoid it next time:
Make the volume level the one you like while the video is not yet in Full Screen mode, wait for 10 or so seconds into the video, then full screen it. If you want to see the start of it in full screen, then simply rewind the video all the way to the start.


Why does my LiveUSB not work? I'm trying to get a dual boot Win8 and Ubuntu on my Asus Vivobook.

I have disabled FastBoot, I disabled FastStartup.

I have set the boot sequence in the correct order (and that works)

I have have created a LiveUSB both with LinuxLive USB Creator and Universal USB Creator. I have tried Ubuntu 12.04 LTS and Ubuntu 13.04.

I got to the GRUB, but when I click "Try Ubuntu", "Install Ubuntu" or "Check Disk for errors", my screen turns black the USB flickers for 2 seconds and then nothing. No Hard Drive action, no USB action nothing (waited for about 10 minutes).

Have you tried a different machine to isolate if its the computer or if its the USB disc?

If it happens on another machine then its the USB. Try installing it on the USB again.

If it doesn't run, try a different USB drive

Win8 PC come with something called secure boot. Just disable it in your BIOS to let the PC boot from removable media.


How do I stream Stereo Mix Audio? I have seen many people asking how to record Stereo Mix alongside microphone using programs like audacity, but is there a way to stream it somewhere? I.E. Omegle or Chatroulette? Long story short, when I'm bored I pass the time by playing music or video clips for people via Omegle (sad, I know) but if there's any way to do it I'd love to hear it. Thanks!


Interfaces not created after upgrade 13.04 to 14.04 I just upgraded my server used for KVM from 13.04 to 14.04 (with 13.10 in between).

Afterwards, the various sub interfaces and bridge interfaces are missing.  The configuration is still present in /etc/network/interfaces.

I tried restarting networking, and rebooting, with no help.  Any suggestions?

Update, here is an excerpt showing bridge and sub interface configuration:

# Connection to MTG-C0901 gig0/2/0/19
auto eth1
iface eth1 inet manual

#subinterface for vlan821
auto eth1.821
iface eth1.821 inet manual
vlan-raw-device eth1

#subinterface for vlan822
auto eth1.822
iface eth1.822 inet manual
vlan-raw-device eth1

#vlan 821
auto br821
iface br821 inet static
bridge_ports eth1.821
bridge_stp off
bridge_fd 0
bridge_maxwait 0

#vlan 822
auto br822
iface br822 inet static
bridge_ports eth1.822
bridge_stp off
bridge_fd 0
bridge_maxwait 0

I also noticed during boot, I see the message "Booting system without full network configuration"

Got it working after running

sudo apt-get install vlan


Ubuntu 18.04 Enable Tap-to-click on Unity desktop I like the look of the Unity desktop more than GNOME, but with Unity, I can't use tap-to-click on my mousepad, is there a way to fix this?

Well, I don't know if Unity has some option for it, hopefully someone will answer on that one. But you can enable it from command line:

list devices with xinput list, and find the touchpad name in the output.
use a xinput set-prop "SynPS/2 Synaptics TouchPad" "libinput Tapping Enabled" 1, where the text in first quotes SynPS/2 Synaptics TouchPad needs to be replaced with touchpad name you got in step 1.

This will only work till reboot, so you'll need to add the command from step 2 to autostart.

I wouldn't use Unity in 18.04 as it is discontinued and you can customize Gnome quite a bit to emulate most of the features anyway, but, to each his own.

In any case, did you uninstall the Gnome utilities while installing Unity? If not, and you are using Xorg, you should see the option for tap-to-click in the Mouse & Touchpad settings.


How can an internal hard drive be made completely inaccessible for the system? I've "rescued" my whole main system HDD onto another fresh drive (using a live CD, to be able to easier access / and /usr from X11), and now I'd like to pretend as if I had physically removed the old drive.
The reason is simple: since the target drive is an exact clone of the source drive (including UUIDs!), Ubuntu may easily get confused when trying to figure out what is what.
And no, I would not want to open the PC and unplug the cable: I would prefer to do this via a software solution.

This is why I'd like to make the source drive inaccessible, so that even /dev/sdb does no longer exist.
Those "tricks" mentioned in other answers that simply put the HDD to sleep (hdparm -Y) do not work here, because I've checked these possibilities and gparted still "knew" about the old drive.
I would not consider the solution I am looking for to be working until gparted really skips from /dev/sda to /dev/sdc.

The only way to "to pretend as if I had physically removed" a disk is to disconnect it:

Power down your system
Open your system, wearing a grounded anti-static strap.
Physically remove the Power cable from the disk. Be very careful, and remember how to replace the cable. Removing the Data cable is not needed. Leave the disk in place.
Put your system back together.

If the disk is powered, and physically connected to the bus, it MUST be visible to the BIOS, and, when it is booted, Ubuntu. Otherwise, you would complain "Ubuntu cannot see my disk!".


WSL Ubuntu bash - Changing colors for user, host, directory information In Ubuntu 18.04 under Windows Subsystem for Linux, the color for the user, host and directories always have same color, if I want to change the theme, all of them change,

In Kali Linux under WSL, everything works pretty fine, also I have been to this page Changing colors for user, host, directory information in terminal command prompt - but it doesn't helped me. I want to change colors bcoz it's so bad when everything is in same color except if you open file in nano or in something else then there is difference in colors but otherwise everything have same color.

I also tested installing Ubuntu WSL on two different computers but still they had same Issue, let me show you the pic. I blurred some space bcoz of privacy but you'll get Idea

I would be so glad if you would help me :), Anyways thanks for reading my question!

WSL isn't designed to give you full Linux capabilities; that it works at all is amazing. Virtualization with VMware, VirtualBox, or other virtual engines is the preferred solution,


Remove or hide desktop folder in ~ (Xubuntu) I've never used "Desktop" folder in my home directory for anything and I would like to remove but it always recreates itself when I delete it or hide it. It's pretty sticky.

I've also tried include folder into .hidden file, editing user-dirs.conf in /etc and /etc/xdg but with no success.

It reminds me every day that I'm not able to get rid of it :-)

Thank you for any information.

There are two possible solutions (as far as I can tell):

Move the Desktop folder

Open the file ~/.config/user-dirs.dirs in a text editor
Change the line XDG_DESKTOP_DIR="$HOME/Desktop" to point to some other location(for example: XDG_DESKTOP_DIR="$HOME/.config/desktop")

Do not just remove the line:Doing so will make it use the default value ($HOME/Desktop) and you'll end up in the same situation that you are already in :-)

Save the file
Log out and back in

Disable the desktop entirely (advanced)

This is a more advanced method that will disable desktop management entirely (including desktop folder creation and display).

Launch a terminal (if you don't know how than this isn't for you)
Type in this command: xfconf-query --channel "xfce4-session" --property "/sessions/Failsafe/Client4_Command" --type string --set ""

Basically it tells the session manager (the thing that starts and monitors your desktop and window manager, panel, ...) to not start any desktop manager ("Client2") anymore

Log out and back in

If you wish to re-enable desktop management later on, do the same steps as above but use the command xfconf-query --channel "xfce4-session" --property "/sessions/Failsafe/Client4_Command" --type string --set "xfdesktop" instead.

Note: I tried the "Move the Desktop Folder" solution in 16.04 and it resulted in turning my desktop empty. (i.e. solid black) Currently working on resolving this, simply reverting the change to the config file does not work.

Update: Problem resolved with a reboot, following a re-edit to the config file.


I'm new to Ubuntu. How do I access my SD Card? I'm doing an arduino project involving file writes/read from an SD Card. My workplace runs on Ubuntu.

When I insert my SD card (it's really an adapter for my Micro SD card), nothing appears under "Devices" in the Files launcher. Is there a way to access it like I would on Windows from My Computer?

-Reboot with the SD card in the slot.

-Do a PCI re-scan

echo 1 | sudo tee /sys/bus/pci/rescan

for more details visit this

You access drives from a File Manager, which you probably know as Windows Explorer or Finder, depending on the operating system you are coming from.

Without knowing specifics of your system, you can probably open the file manager by pressing AltF2 and typing nautilus and pressing Enter.  The drives will be listed on the left.


Mouse button gets locked in java applications I'm running a relatively fresh installation of Ubuntu 18.04 on a new laptop. I have a couple of applications that I use that are written in Java -- specifically Aqua Data Studio and JetBrains Data Grip.

After a reboot, I can run one of these applications exactly one time without issue. SO for example, after a reboot I can run Data Grip, and it will work perfectly. At this point, one of several actions can trigger a change:

I keep Data Grip running, and fire up an instance of Aqua Data Studio
I close Data Grip, and fire up an instance of Aqua Data Studio
I close Data Grip, and run a new instance of Data Grip

In any of those cases, I end up with what appears to be a stuck mouse. Sometimes it will seem to be stuck down (so moving the mouse around will either drag objects, or select text) or or stuck up (where I am unable to click on any target inside any of the Java windows).

When the mouse it stuck, the keyboard responds perfectly. If I Alt-Tab away to a different window, the mouse works 100% as expected. If I Alt-Tab back to the offending Java window, the mouse reverts back to the aberrant behavior that it was demonstrating previously.

Data Grip, I think, comes with an embedded java. Aqua Data Studio has the option to run either an embedded java, or the system java. Some versions will be available below.

I get the same results from the touchpad, or from a USB mouse.

$uname -a
Linux kirk-xps 4.15.0-24-generic #26-Ubuntu SMP Wed Jun 13 08:44:47 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

$ java -version
openjdk version "1.8.0_171"

$ ./bin/datastudio-18.5/jre/bin/java -version
java version "1.8.0_102"

$ ./bin/datastudio_19/jre/bin/java -version
java version "1.8.0_102"

$ gnome-shell --version
GNOME Shell 3.28.2

$ dmesg | grep -i touchpad
[    7.047559] psmouse serio1: synaptics: Your touchpad (PNP: DLL07e6 PNP0f13) says it can support a different bus. If i2c-hid and hid-rmi are not used, you might want to try setting psmouse.synaptics_intertouch to 1 and report this to linux-input@vger.kernel.org.
[    7.102431] psmouse serio1: synaptics: Touchpad model: 1, fw: 8.2, id: 0x1e2a1, caps: 0xf00323/0x840300/0x12e800/0x0, board id: 3038, fw id: 2375007
[    7.138451] input: SynPS/2 Synaptics TouchPad as /devices/platform/i8042/serio1/input/input6
[  110.568852] input: DELL07E6:00 06CB:76AF Touchpad as /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-7/i2c-DELL07E6:00/0018:06CB:76AF.0006/input/input27

$ free -m
          total        used        free      shared  buff/cache
available
Mem:          15756        5038        5695        1981        5022       8835
Swap:           979           0         979

DataGrip is using Java 1.8.0_152.

I am experiencing this problem too.  I had the problem in 18.04 and still have it in 20.04.
The app I see it in is JabRef.  The version I'm using is 5.2 and it has an embedded java, although I had this problem with the default install JabRef on both versions of Ubuntu.
$ ~/opt/JabRef/lib/runtime/bin/java --version
openjdk 15.0.1 2020-10-20
OpenJDK Runtime Environment Zulu15.28+51-CA (build 15.0.1+9)
OpenJDK 64-Bit Server VM Zulu15.28+51-CA (build 15.0.1+9, mixed mode)

The behavior is exactly as you describe.  I will note that it doesn't start out this way but some errant mouse click will induce it and from then on it's stuck in that mode.
I've watched mouse events with xinput and xev after this issue is triggered and there are no additional events occurring when over the window, just regular mouse movement.  When I reach an element in the window that would normally respond to drag events that element starts acting as if drag event is in progress.
In the JabRef case, the drag event affects boundary placing and column selection in the app.  Closing the app and re-opening does nothing.   The only thing that seems to work is to restart the desktop, which is super annoying.
I suspect it has something to do with the window manager and java playing nice together.


How do I find the kernel version, Ubuntu release and disk partition information from the terminal? Which commands will give me information about following using Terminal?

Kernel Version
Distribution version no.
All partition size of the HDD

uname -a for all information regarding the kernel version,
uname -r for the exact kernel version

lsb_release -afor all information related to the Ubuntu version,
lsb_release -r for the exact version

sudo fdisk -l for partition information with all details.
For more understandable information regarding paritions, please use commands given in other answers.

To find the exact distribution, that is Ubuntu 16.04.1 or Ubuntu 16.04.3 you would use

lsb_release -d


in place upgrade from 19.10 to 20.04 I have tried to do an in place upgrade from 19.10 to 20.04 but the manager isnt findding any updates it just says my system is up to date. Will the GUI based in place upgrade for 19.10 come in the next few days?

Run the following commands:

sudo apt-get update
sudo apt-get upgrade -y

Then reboot

Make sure the update-manager-core is installed

sudo apt-get install update-manager-core -y

After this issue the following command:

sudo do-release-upgrade

If the command says that there is no new release available and you still want to go ahead with the upgrade to the development release, you can use the the -d option. So enter this into terminal:

sudo do-release-upgrade -d

You should be asked to continue with the upgrade. Follow the prompts and you should upgrade to 20.04!


Ext4-extended-linuxswap I have just installed GPARTED on Ubuntu.

I should only have 1 partition however it lists it as:

Partition:       File System    Mount Point    Size

/dev/sda1       ext4            /               919.79 Gib
/dev/sda2       extended                         11.72 Gib
    /dev/sda5   linux-swap                       11.72 GIb

The Sda1 makes sense, but what is the sda2 and extended mean? can I delete this an make 1 file system?

There are three types of partitions.
1. Primary
2. Extended
3. Logical

There can only be 4 primary partitions on a hard drive. When one wants to create more than 4 partitions, an extended partition is created and then more logical partitions are created inside the extended partition. So extended partition is like a container which contains logical partitions in it. For more on partitions go to http://www.pcguide.com/ref/hdd/file/structPartitions-c.html

In your HDs configuration sda1 is a primary partition, sda2 is just an extended partition and sda5 is a logical partition which is inside sda2 and occupies all the space of sda2. You can see that sda2 and sda5 have exactly the same space. So basically there are just 2 useable partitions i.e sda1 and sda5.

Sda5 is linux swap space. In linux, a partition is reserved as swap space. Swap space is used to extend your ram using some space on your hard disk. So if you have just 64 MB ram and you are able to run binaries or programs larger than 64 MB, it is because your some space on your HD is being used to extend your ram. When some part of program is not being use at the moment it is swapped out of ram in to the swap space. When program needs that part, it is swaped back in to the ram. If you want to know more you can google for virtual memory and you will find a lot of info about it.

DO NOT delete these partitions as Linux needs swap space to run.

sda1 is usually where your files and linux operating system files are kept. (dev/sda1)

I'm not entirely sure what the Extended is for, I think this mounts as a separate drive... which on Ubuntu will say 11.72GB File system.

Your sda5 (dev/sda5) is your linux swap. The swap is used when sda1 is full and the system needs to write something temporary to disk. A Linux swap isn't really needed, it just helps when your HDD is full.


Not able to see the file contents I am using 12.04 Ubuntu cloud image.But when I am using vi for example vi p1.c to create a file I am not able to see what are the contents I am adding to it.

But when I am using cat p1.c I am able to see the contents what I have added.

Kindly help me out .

download nano, you can see file content like example
sudo nano /etc/resolv.conf
to see and edit your DNS setting


Apt downloads very slow Apt downloads headers and packages very slow (around 50kBps). I tried to change apt mirrors to main one but it didn't help. How to solve this?

Disable IPv6 systemwide

Open sysctl.conf

sudo nano /etc/sysctl.conf

Append following lines to the end of the file

net.ipv6.conf.all.disable_ipv6 = 1

net.ipv6.conf.default.disable_ipv6 = 1

net.ipv6.conf.lo.disable_ipv6 = 1

Save and exit. (ctrl+o then ctrl+x)
Reboot


How to fix problematic Ubuntu ppa configuration? When I do sudo apt-get update

I get following errors:

Err http://archive.ubuntu.com raring/main amd64 Packages
  404  Not Found [IP: 91.189.91.23 80]
Err http://archive.ubuntu.com raring/restricted amd64 Packages
  404  Not Found [IP: 91.189.91.23 80]
Err http://archive.ubuntu.com raring/universe amd64 Packages
  404  Not Found [IP: 91.189.91.23 80]
Err http://archive.ubuntu.com raring/multiverse amd64 Packages
  404  Not Found [IP: 91.189.91.23 80]
Err http://archive.ubuntu.com raring/main i386 Packages
  404  Not Found [IP: 91.189.91.23 80]
Err http://archive.ubuntu.com raring/restricted i386 Packages
  404  Not Found [IP: 91.189.91.23 80]
Err http://archive.ubuntu.com raring/universe i386 Packages
  404  Not Found [IP: 91.189.91.23 80]
Err http://archive.ubuntu.com raring/multiverse i386 Packages
  404  Not Found [IP: 91.189.91.23 80]
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/raring/main/binary-amd64/Packages  404  Not Found [IP: 91.189.91.23 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/raring/restricted/binary-amd64/Packages  404  Not Found [IP: 91.189.91.23 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/raring/universe/binary-amd64/Packages  404  Not Found [IP: 91.189.91.23 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/raring/multiverse/binary-amd64/Packages  404  Not Found [IP: 91.189.91.23 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/raring/main/binary-i386/Packages  404  Not Found [IP: 91.189.91.23 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/raring/restricted/binary-i386/Packages  404  Not Found [IP: 91.189.91.23 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/raring/universe/binary-i386/Packages  404  Not Found [IP: 91.189.91.23 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/raring/multiverse/binary-i386/Packages  404  Not Found [IP: 91.189.91.23 80]

E: Some index files failed to download. They have been ignored, or old ones used instead.

I suspect this is causing me a lot of issues while adding new ppa's and installing other programs. At the moment I am unable to install rmagick gem, which required other packages which wont install cause it says:

The following packages have unmet dependencies:
 libmagickcore-dev : Depends: librsvg2-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Please help, or the last resort will be to re-install Ubuntu, which I am sure nobody enjoys.

Uname output >>

Linux aditya-Vostro-3446 3.5.0-59-generic #86~precise1-Ubuntu SMP Wed Feb 4 09:52:40 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

After your information, the output of lsb_release -a is

LSB Version:    core-2.0-amd64:core-2.0-noarch:core-3.0-amd64:core-3.0-noarch:core-3.1-amd64:core-3.1-noarch:core-3.2-amd64:core-3.2-noarch:core-4.0-amd64:core-4.0-noarch:cxx-3.0-amd64:cxx-3.0-noarch:cxx-3.1-amd64:cxx-3.1-noarch:cxx-3.2-amd64:cxx-3.2-noarch:cxx-4.0-amd64:cxx-4.0-noarch:desktop-3.1-amd64:desktop-3.1-noarch:desktop-3.2-amd64:desktop-3.2-noarch:desktop-4.0-amd64:desktop-4.0-noarch:graphics-2.0-amd64:graphics-2.0-noarch:graphics-3.0-amd64:graphics-3.0-noarch:graphics-3.1-amd64:graphics-3.1-noarch:graphics-3.2-amd64:graphics-3.2-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-3.2-amd64:printing-3.2-noarch:printing-4.0-amd64:printing-4.0-noarch:qt4-3.1-amd64:qt4-3.1-noarch
Distributor ID: Ubuntu
Description:    Ubuntu 12.04.5 LTS
Release:    12.04
Codename:   precise

The error messages are based on Raring.

To fix this, run this commands:

sudo sed -i 's/raring/precise/g' /etc/apt/sources.list
sudo find /etc/apt/sources.list.d -name "*.list" -print0 | sudo xargs -0 sed -i 's/raring/precise/g'
sudo apt-get update

So that the entries are corrected to match your system.

I hope this helps

deb http://old-releases.ubuntu.com/ubuntu/ raring main
deb http://old-releases.ubuntu.com/ubuntu/ raring universe

You can add all repositories using this source.


How do I know if my system is vulnerable to the ShockShell vulnerability? The recently discovered ShockShell vulnerability affects many Linux and Mac systems, because they are using the vulnerable BASH shell.

How do I know if I am vulnerable to this attack and how do I protect myself from it?

The ShockShell vulnerability affects many systems.

Is my system affected?

If you want to check if your system is affected, run the following command inside a terminal window running bash. Ubuntu's gnome-terminal runs bash by default (to see if you are running bash, then run echo $SHELL, and if it echoes bash then you run bash) :

env x='() { :;}; echo vulnerable' bash -c 'echo hello'

If your system is vulnerable, then you will see this:

vulnerable

hello

If it is not vulnerable you will see this:

bash: warning: x: ignoring function definition attempt

bash: error importing function definition for 'x'

hello

How do I protect myself?

Programmers have quickly released patches for this vulnerability, so make sure that you have the latest versions of all the packages in your system installed:

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

This will upgrade your bash version to the latest, patched one and you should be safe.

Why is this vulnerability serious?

This vulnerability is said by some to be more serious than the HeartBleed vulnerability because it allows remote execution of commands through bash to the infected systems.


On Unity: What can replace Gnome 2 system monitoring in the top Panel? I'm used to having System monitoring in the top Gnome Panel: CPU, Temperature, Net, Fan-Speed. (see screenshot below)

In Unity, the Top Panel is locked for window name and global menu, so I can't add panel applets.
So my question is:

Is there a way to replace this kind of system monitoring (always visible, taking not much space) in Unity?

Exactly like old gnome indicator: http://www.webupd8.org/2011/05/network-memory-and-cpu-usage-indicator.html#more

Note from the link: Once installed, launch System Load Indicator from Dash. Unlike the old gnome applets, this is how to add those indicators to the panel.

I tried a few applications and I found that the one on KDE is for me the best system monitor tool: ksysguard.

It is in the Ubuntu standard repositories, so you just install it in Software Center.

See the comparison in this screenshot.

As you can see, ksysguard is a lot better.


Ubuntu 14.04 DVD drive won't work I just got a new DVD drive that I know works because it live boots another distribution. When I put a dvd into the drive it repeatedly tries and fails to spin up, and Ubuntu doesn't recognize that there is a dvd in the drive.

Here is the lshw output with:

No dvd in the drive:

*-cdrom
         description: DVD reader
         product: CDW/DVD TS-L462C
         vendor: TSSTcorp
         physical id: 0.0.0
         bus info: scsi@0:0.0.0
         logical name: /dev/cdrom
         logical name: /dev/sr0
         version: TO10
         capabilities: removable audio cd-r cd-rw dvd
         configuration: ansiversion=5 status=nodisc

With a dvd in the drive:

*-cdrom
         description: DVD reader
         product: CDW/DVD TS-L462C
         vendor: TSSTcorp
         physical id: 0.0.0
         bus info: scsi@0:0.0.0
         logical name: /dev/cdrom
         logical name: /dev/sr0
         version: TO10
         capabilities: removable audio cd-r cd-rw dvd
         configuration: ansiversion=5 status=nodisc

What should I do to get it running correctly?

Could be anything described here: https://help.ubuntu.com/community/RestrictedFormats/PlayingDVDs
I am experiencing the same issue with 14.04, 15.10 and 16.04 and it is great frustration.

On 15.10 I had partial success with regionset setting, but not permanent, plus I have DVDs from both EU and USA.

I would give this Fluendo player a shot, but it seems it does not support 16.04?

Try this:

sudo mkdir /media/cdrom
sudo -H gedit /etc/fstab

In the text editor, add this line:

/dev/sr0    /media/cdrom udf,iso9660 ro,user,noauto,exec,utf8 0 0


alien cannot built package for architecture "ubuntu amd64" I'm using ubuntu i686.
Need to install i386 .rpm packages.
tried this code:

alien -i [file.i386.rpm]

Tried to install ia32-libs...

apt-get install ia32-libs

...and tried alien again but didn't work.

any suggestion?
thx.

[EDIT]
[suggestion #1: run alien with sudo -c -v ...]
your suggestion didn't work. Same error reported:

file.i386.rpm is for architecture i386 ; the package cannot be built on this system.

The line above the error is the command chmod:

chmod 755 ["name of directory"/debian/rules]

any other suggestion?
thx.

I had the same problem and solved it this way:

alien --to-tgz --scripts file.i386.rpm
mkdir unpack
cd unpack
tar -xpzf ../file.tgz
mv install ..
cp -rv * /
cd ../install
./doinst.sh

The RPM is converted to a TGZ file.
Be aware that the ".386" is not in the name of the TGZ file.

8086 = 8-bit

80186 = 8-bit

80286 = 16-bit

80386 = 32-bit

80486 = 32-bit

80586 = 32-bit = Pentium, Pentium MMX, K5, K6, K6-II, K6-III

80686 = 32-bit = Pentium Pro, Pentium II, Pentium III, Athlon, Athlon XP, Opteron*, Athlon FX-51*, Athlon FX-53*, Athlon 64*

80786 = 32-bit = Pentium 4

= 32-bit/64-bit

If you have compiled a program for 386 architectures, only the processors equal to it or above it can execute it.

So the i386.rpm cannot run to your ubuntu i686


Graphics issues after/while installing Ubuntu 16.04/16.10 with NVIDIA graphics I installed or upgraded to Ubuntu 16.04, but I'm having some problems with my graphics card.

The display is blank
The display flickers
Items on the screen do not display correctly
Certain programs complain of graphics issues
The computer boots to low-graphics mode
Your specific issue may not be here, but try the solutions described in the answers anyway.

This question is very broad, but each one of these issues likely has one solution.

If you are experiencing a login loop, check the last part of my answer.

If you experience one of the listed issues and have your own solution (mine didn't work, or there's a faster way), feel free to post another POLITE answer, describing your problem and how you fixed it.

Those attempting to install Ubuntu, please refer to the section titled: If you are unable to enter a TTY or are trying to install Ubuntu.

Please be aware that this answer may become slightly outdated. I will do my best to update it regularly, but I can't guarantee anything. The driver version used below may not be the latest. Please check the Launchpad page to confirm.

Each of the issues described (and maybe even more) can be fixed by following the steps below.

If you're installing Ubuntu, follow section 3.

1. First make sure you can enter a TTY

Press Ctrl+Alt+F1

If this brings you to a black screen with a login prompt, continue on. Otherwise, you will likely have to boot with a special kernel flag. Instructions are below.

2. Now for the fix

Log into your account in the TTY.
Run sudo apt-get purge nvidia-*
Run sudo add-apt-repository ppa:graphics-drivers/ppa and then sudo apt-get update.
Run sudo apt-get install nvidia-driver-430.
Reboot and your graphics issue should be fixed.

3. If you are unable to enter a TTY or are trying to install Ubuntu

Reboot into GRUB.
Highlight the Ubuntu option and press E.
Add nouveau.modeset=0 to the end of the line beginning with linux.
Press F10 to boot.
Follow the instructions above.

(If installing Ubuntu, ignore this step, but follow the rest of the tutorial after the installation is finished.)

This solution should fix many problems described by users after an upgrade to 16.04. If a fresh install is affected, the solution is the same.

If you run into problems afterward, you should ask a different question. (Refer to this question so that we know it isn't a duplicate.) However, there are a few other small fixes you can try out before you do.

Reinstall Xorg

Go back into the TTY and run sudo apt-get purge xorg-* xserver-xorg; sudo apt-get install xorg xserver-xorg; sudo dpkg-reconfigure xorg.

Reinstall your desktop environment

If on Unity, run sudo apt-get purge ubuntu-desktop; sudo apt-get install ubuntu-desktop.
If on GNOME run sudo apt-get purge ubuntu-gnome-desktop gnome-desktop-environment; sudo apt-get install ubuntu-gnome-desktop.
If on MATE run sudo apt-get purge ubuntu-mate-desktop mate-desktop-environment; sudo apt-get install ubuntu-mate-desktop
Each Ubuntu DE has its own package name. If you have KDE or something else, the name should be similar to the ones above.

Fresh reinstall

It's not the most inviting option, but sometimes it's the best thing to do in cases like this.

Please remember that there are a lot of things that can go wrong, and this is not a guaranteed fix for everything. Even if you are experiencing something listed in the question, the solution may not fully work for you.

This answer is merely for driver issues with 16.04 and nVIDIA. Your issue may go deeper than a bad driver.

Other issues after the fix

If you get to a working display, but run into a login loop (you login and get returned to the login screen), take a look here.

My solutions is this.

OS ubuntu 16.04
nvidia driver before 350, installed in software updates from ubuntu

I download from nvidia the driver 370 and i execute sh./path-to-driver in terminal enter to tty

ctrl alt f1

and kill process lightdm

sudo service lightdm stop

with this commands have problems

Solution

First reboot the pc and my first problem was i cannot enter to desktop in ubuntu and cannot enter to tty terminal, i enter in recovery mode and go to root terminal and make this

nvidia-uninstall

this remove the nvidia driver that your install with command ./nvidia.run

and reboot and look. you need to install driver of ubuntu with

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
sudo apt-get install nvidia-current

or find in software and updates and install the driver

This solution is my solution of same problem before. i cannot uninstall driver when i download of nvidia web page


Problem with the Display after moving hard drive from one laptop to another I am having a problem with the Display on my Laptop running Ubuntu 10.04

Since last few days, I am using the laptop in low-graphics mode. When I try to run the command glxinfo, I get a error message

  xlib extension glx missing on display !:1.0

and causes a Segmentation Fault.

I am using Toshiba Laptop with 945GM/GMS, 943/940GML Express Integrated Graphics Controller ( Output from lshw )

Note :

I was using Sony Laptop with NVIDIA Graphics card. I took the HDD from Sony Laptop and put it in Toshiba Laptop having Intel Chipset Graphics Card.

Since then, I am having the problem with the display.

I tried to remove the drivers from NVIDIA but with no success.

Please let me know, how to remove the NVIDIA drivers completely and install Intel Drivers.

Try this

Run sudo dpkg-reconfigure xserver-xorg.  This should cause X to reconfigure itself.  The appropriate driver (i915) should get automatically chosen.

The driver should have an uninstall switch like so:

sudo sh NVIDIA* --uninstall


How to find my current JAVA_HOME in ubuntu? How to find my current JAVA_HOME in ubuntu? I have to set java_home path when installing maven.

To display JAVA_HOME variable path, type in terminal:
echo $JAVA_HOME

If nothing appears then set it with this:
export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64

This will differ according to your JDK type and version.
For displaying it again, follow the first command.
Follow JREs from different vendors on the same system, for using different JDK's or switch between JDK's.

to get JAVA_HOME:
update-alternatives --query java | grep 'Value: ' | sed 's/Value: \(.*\)\/bin\/java/\1/'

## e.g. returns  </opt/Oracle_Java/jre1.8.0_202>
## if            </etc/alternatives/java>  points to
##               </opt/Oracle_Java/jre1.8.0_202/bin/java>

to set JAVA_HOME:
export JAVA_HOME="$(update-alternatives --query java | grep 'Value: ' | sed 's/Value: \(.*\)\/bin\/java/\1/')"


some websites not accessing still I have seen this problem before, some of them were solved by changing DNS of their network connection. But my problem not solved by doing this.

I have tried Google DNS, but I still have the same problem. I am unable able to access yahoo.com from my browser. What else can I do , I don't get it.

Please can someone suggest a way that I can get complete access. Thank you.

The only thing I am getting in my browser(Firefox) is waiting for yahoo.com

Details:

Ubuntu 13.04

BSNL Broadband -DSL Connection

Information:

raja@raja-OEM:~$ host yahoo.com
yahoo.com has address 98.139.183.24
yahoo.com has address 206.190.36.45
yahoo.com has address 98.138.253.109
yahoo.com mail is handled by 1 mta7.am0.yahoodns.net.
yahoo.com mail is handled by 1 mta6.am0.yahoodns.net.
yahoo.com mail is handled by 1 mta5.am0.yahoodns.net.
raja@raja-OEM:~$ host yahoo.com 8.8.8.8
Using domain server:
Name: 8.8.8.8
Address: 8.8.8.8#53
Aliases:

yahoo.com has address 98.139.183.24
yahoo.com has address 206.190.36.45
yahoo.com has address 98.138.253.109
yahoo.com mail is handled by 1 mta7.am0.yahoodns.net.
yahoo.com mail is handled by 1 mta6.am0.yahoodns.net.
yahoo.com mail is handled by 1 mta5.am0.yahoodns.net.
raja@raja-OEM:~$ ping yahoo.com
PING yahoo.com (98.138.253.109) 56(84) bytes of data.
64 bytes from ir1.fp.vip.ne1.yahoo.com (98.138.253.109): icmp_req=1 ttl=47 time=404 ms
64 bytes from ir1.fp.vip.ne1.yahoo.com (98.138.253.109): icmp_req=2 ttl=50 time=388 ms
64 bytes from ir1.fp.vip.ne1.yahoo.com (98.138.253.109): icmp_req=3 ttl=47 time=453 ms
64 bytes from ir1.fp.vip.ne1.yahoo.com (98.138.253.109): icmp_req=4 ttl=48 time=433 ms
64 bytes from ir1.fp.vip.ne1.yahoo.com (98.138.253.109): icmp_req=5 ttl=47 time=419 ms
64 bytes from ir1.fp.vip.ne1.yahoo.com (98.138.253.109): icmp_req=6 ttl=50 time=400 ms
64 bytes from ir1.fp.vip.ne1.yahoo.com (98.138.253.109): icmp_req=7 ttl=47 time=433 ms
64 bytes from ir1.fp.vip.ne1.yahoo.com (98.138.253.109): icmp_req=8 ttl=50 time=420 ms
64 bytes from ir1.fp.vip.ne1.yahoo.com (98.138.253.109): icmp_req=9 ttl=47 time=434 ms
64 bytes from ir1.fp.vip.ne1.yahoo.com (98.138.253.109): icmp_req=10 ttl=51 time=413 ms

[1]+  Stopped                 ping yahoo.com
raja@raja-OEM:~$ curl -I yahoo.com
HTTP/1.1 301 Redirect
Date: Sun, 23 Jun 2013 13:37:59 GMT
Connection: close
Server: YTS/1.20.13
Cache-Control: no-store
Content-Type: text/html
Content-Language: en
Location: http://www.yahoo.com/
Content-Length: 211

raja@raja-OEM:~$

Progress:

I have tried to gain access with https://www.unifiedremote.com/ but it said that it was an Untrusted Connection

I had the same problem .The problems seem to vanish when i used pppoeconf to connect. install pppoeconf and connect using it.


secure boot: verification of initramfs according to https://wiki.ubuntu.com/UEFI/SecureBoot Initrd images are not validated. Is this information up to date? this would make the whole secure boot totally useless as an attacker could very easily replace initramfs with a one that logs LUKS password and sends it to him... This in turn would make all the module signing hassle and disabling hibernation on secure boot totally ridiculous.

if it's indeed so, is there any launchpad bug/feature-request that we can upvote to make secure boot actually secure?

OTOH, if this statement is obsolete, how does the verification work? where is the key pair that is used to sign initrd files when they are generated during new kernel installations? which component later verifies the signature? (shim, MOK, GRUB, kernel itself?) ...or maybe PCRs and TPM are somehow used instead?
...and how about the kernel command line? this one must be signed/verified also to make the boot secure...

You do not even need to sign/verify the initramfs, because you do not need to keep it accessible (unenencrypted on a local disk).

Ubuntu 20.04 is perfectly capable of dealing with an installation layout where the initrd file is contained inside an encrypted container (currently works for luks1 on AMD64 & ARM64, luks2 and more platforms in future versions). Other than downgrading to the earliest version with identical kernel, nobody but you could modify the initrd sealed with your password.

The part that is really missing in current automation is the generation of a signed grub binary that verifies its own configuration. It works out of the box too - grub can verify gpg-style signatures - but the kernel install scripts shipped by Canonical do not setup/update that in the usual fully automatic fashion.

If you wanted to to configure a fully verified boot chain in current Ubuntu releases, you might try to place your own script (which gpg --signs your config, then integrates that into the grub binary using grub-mkstandalone then sbsigns that binary before placing it into /boot/efi)  into /etc/kernel/postinst.d/ to have it automatically called whenever your install/remove a kernel (version).

Note that almost no consumer PC is actually used to enroll custom keys for secure boot (MOK), so you will likely run into some firmware bugs. You will not find too many bug reports about this topic either, simply because few people want/do such a complicated and error-prone thing.

And this is just the Ubuntu side of things. You probably win nothing in terms of security (but you are welcome to contribute there).

You might need to define a threat model first: what are you trying to protect against?
Secure Boot should prevent even the root user from breaking the integrity of code that runs at kernel-level privilege. This is most obvious at boot: even root should not be able to install a kernel or bootloader that isn't trustworthy, and we use signatures to determine trustworthiness. However, it also extends to the running kernel: Ubuntu kernels will detect secure-boot and enter lockdown integrity mode early in boot. Integrity mode attempts to maintain that security boundary between root and the kernel at runtime. (This stops you doing something like kexec-ing from a trusted kernel to an untrusted one.)
Something that has never been part of the secure boot mission is protecting against root replacing non-kernel binaries. This is a reasonably difficult problem and scripting languages make it even harder. It's even more fraught in the FOSS world because people get very irate at anything they perceive to be limiting software freedom, even if it's possible to disable. (See, for example, what Apple does with signing basically everything!)
There are definitely ways to restrict root installing malicious binaries. You can use grub's detached signature support to require that the initrd is signed. But then everything, even grub.cfg, has to be signed, and that would get really irritating to administer. You could use something like dm-verity. IMA could help you (but not so much for scripts). But you very quickly stop having a general purpose system!


Gui Torrent Creator with WebSeeding I am looking for Torrent Creator with Web seeding ability. Please tell me if there are any available to me under Ubuntu or any other place.

Clients like Transmission and Deluge are capable of creating torrents. Once the torrent file is created, it needs to be uploaded to your favorite torrent site for seeding( i.e. isohunt.com). Usually, instructions are provided on the front page of the site to get your torrent file uploaded.

Transmission
Transmission is the default torrent client in Ubuntu. To create a new torrent, go to file menu and choose the new option (Or press Ctrl+N).

Like most torrent clients, it also supports seeding.


Sample Application built with Quickly can't access Web I am running Tutorial application example for Quickly  ( I named App Smallbrowser). This is code from SmallbrowserWindow.py :

import gettext
from gettext import gettext as _
gettext.textdomain('smallbrowser')

from gi.repository import Gtk, WebKit # pylint: disable=E0611
import logging
logger = logging.getLogger('smallbrowser')

from smallbrowser_lib import Window
from smallbrowser.AboutSmallbrowserDialog import AboutSmallbrowserDialog
from smallbrowser.PreferencesSmallbrowserDialog import PreferencesSmallbrowserDialog

# See smallbrowser_lib.Window.py for more details about how this class works
class SmallbrowserWindow(Window):
    __gtype_name__ = "SmallbrowserWindow"

    def finish_initializing(self, builder): # pylint: disable=E1002
        """Set up the main window"""
        super(SmallbrowserWindow, self).finish_initializing(builder)

        self.AboutDialog = AboutSmallbrowserDialog
        self.PreferencesDialog = PreferencesSmallbrowserDialog

        # Code for other initialization actions should be added here.

        self.refreshbutton = self.builder.get_object("refreshbutton")
        self.urlentry = self.builder.get_object("urlentry")
        self.scrollwindow = self.builder.get_object("scrollwindow")
        self.webview =  WebKit.WebView()
        self.scrollwindow.add(self.webview)
        self.webview.show()

    def on_refreshbutton_clicked(self, widget):
        print "refresh"

    def on_urlentry_activate(self, widget):
        print urlsite
        urlsite = widget.get_text()

        self.webview.open(urlsite)

So when I run Smallbrowser and write desired Url I got this error on WebKit canvas :

  Unable to load page Problem occurred while loading the URL
  http://www.google.com/ Cannot resolve proxy hostname ()

I don't understand where is my mistake.

I don't find any errors in the code you have written so i guess the problem lies in the way you have configured your proxy settings for your computer. Go to Network Settings --> Proxy
change the settings to None and try again.

replace this

self.webview.open(urlsite)

with this

self.webview.open("https://" + urlsite)

And it should work.


Installing/Configuring Zend Debugger for Eclipse PDT I`m unable to configure in IDE or install properly Zend debugger.

Installed php5.6 libapache2-mod-php5.6 and so on.
Downloaded Zend debugger for php5.6 separate from other zend stuff. (It last available separate from zend studio, thats why I choose php5.6)
Copy dummy.php to document root, check in browser it works(empty page without errors)
Add following to php.ini:

  $ tail -n 10 /etc/php/5.6/apache2/php.ini
  [Zend]
  zend_extension="/usr/lib/php/20131226/ZendDebugger.so"
  zend_debugger.allow_hosts=127.0.0.0/8,192.168.0.0/16
  zend_debugger.expose_remotely=1
  zend_debugger.connector_port=10137

Do configure debugger in eclipse>Window>PHP>Servers>Localhost>Edit:

local server configure

debugger settings for server

global debugger settings

Error occurred: click on test button in debugger settings

Error occurred: return to global debugger settings

Try to debug:
click on debug as>php web application

What I`m doing wrong? Reading a lot of pages, all give similar instructions as above. Please help.

Also posting phpinfo() screenshot, all seems fine there:
 - zend debugger settings
 - zend modules

UPDATE: I found a solution, for thus who interested read the post bellow. Site does`t accept it as answer yet.

Zend Debugger installed from separate bundle not working with PHP5.6. Problem in Zend opcache module. Seems they loaded in incorrect order.

Disabling zend opcache makes the solutions. Debugger work fine. But it possible to make work both this way:

Comment out it in config: (cli version seems to be symlink as also disabled)

lenya@JabbaDesktop:~$ sudo nano /etc/php/5.6/apache2/conf.d/10-opcache.ini

; configuration for php opcache module
; priority=10
; zend_extension=opcache.so

At bottom of /etc/php/5.6/apache2/php.ini:

[Zend]
zend_extension="/usr/lib/php/20131226/opcache.so"
zend_extension="/usr/lib/php/20131226/ZendDebugger.so"
zend_debugger.allow_hosts=127.0.0.0/8,192.168.0.0/16
zend_debugger.expose_remotely=1
zend_debugger.connector_port=10137

First two lines(.so) should be exactly in this order.
Installing debugger "how to" easy to find in google. No one mention above problem.


Cannot find a way to load a custom xkb keymap on login in Kubuntu 20.04 I have made a custom xkb keymap that I am happy with, and I can load it with no issues using the following script
xkbcomp -I$HOME/.xkb ~/.xkb/keymap/mykeys $DISPLAY
and it works the way I want when I do it manually.
My problem is, I could not find any reasonable place to put it where it could be run on login and NOT get overwritten by the default configuration.
I have tried ~/.xinitrc, ~/.xsession, ~/.xsessionrc, ~/.xprofile, even ~/.config/autostart-scripts
Most of those scripts are run (checked with zenity), but it looks like something downstream apparently reverts back to the default configuration later, so that when my KDE plasma loads, the keys I remapped do not work until I run this script again manually.
How could I fix this?
UPDATE: I also noticed that I need to re-run the script after the laptop wakes up from sleep. Is there a way to make it more permanent without modifying the default config in /usr/share/X11/xkb ?
UPDATE 2: When the laptop wakes up from sleep, my keys are actually still working for about 2-3 seconds, and then suddenly stop (around the same time my bluetooth mouse reconnects: not sure whether this could be related or not) until I re-run the script.
UPDATE 3: Here's the contents of ~/.xkb/keymap/mykeys :
xkb_keymap {
    xkb_keycodes  { include "evdev+aliases(qwerty)" };
    xkb_types     { include "complete"  };
    xkb_compat    { include "complete"  };
    xkb_symbols   { include "pc+us+inet(evdev)+mysymbols(super_arrows)" };
    xkb_geometry  { include "pc(pc105)" };
};

and this is ~/.xkb/symbols/mysymbols:
partial modifier_keys
xkb_symbols "super_arrows" {
    key <LEFT>  {
        type = "PC_SUPER_LEVEL2",
        symbols[Group1] = [    Left,   Home      ],
        actions[Group1] = [    NoAction(),  RedirectKey(keycode=<HOME>, clearmods=Mod4) ]
    };
    key <RGHT>  {
        type = "PC_SUPER_LEVEL2",
        symbols[Group1] = [    Right,  End       ],
        actions[Group1] = [    NoAction(),  RedirectKey(keycode=<END>, clearmods=Mod4) ]
    };
    key <UP>  {
        type = "PC_SUPER_LEVEL2",
        symbols[Group1] = [    Up,  Prior       ],
        actions[Group1] = [    NoAction(),  RedirectKey(keycode=<PGUP>, clearmods=Mod4) ]
    };
    key <DOWN>  {
        type = "PC_SUPER_LEVEL2",
        symbols[Group1] = [    Down,  Next       ],
        actions[Group1] = [    NoAction(),  RedirectKey(keycode=<PGDN>, clearmods=Mod4) ]
    };
    key <INS> {
        symbols[Group1] = [    Print             ],
        actions[Group1] = [    RedirectKey(keycode=<PRSC>) ]
    };
};

If I put include "mysymbols(super_arrows)" into /usr/share/X11/xkb/symbols/pc, and a symlink to mysymbols into /usr/share/X11/xkb/symbols, then my config becomes stable, but after re-login the redefined keys seize to auto-repeat (when pressed and held).
So my current process is: after login:

launch xkbcomp -I$HOME/.xkb ~/.xkb/keymap/mykeys $DISPLAY manually
uncomment include "mysymbols(super_arrows)" in /usr/share/X11/xkb/symbols/pc
Then I can use the config normally until the next restart (re-login) :)
Linux is really full of magic ! ;)

This is explained (for another layout, but you'll find your way) at the bottom of this page.


Touch screen not working after some reboots (another reboot resolves it) I am trying to troubleshoot an issue on a Lenovo Flex 14 with Ubuntu 14.04.1 (standard Unity flavour) with touchscreen.

Mostly it works perfectly well; but from time to time I reboot (mostly unintentionally due to the placement of the power button, but sometimes because of auto update [updating the kernel??]), and when it does, on some reboots the touchscreen does not work (does not respond to touch).

I have tried during these occurrences, doing as full a dump as I could of

cpuinfo
lsmod
lspci
lsusb

to text files.

When I reboot, the touchscreen is fine again. Both times when I let the laptop boot, I do not change any settings or add any options. I just let it boot on its own.

So I dump the same information again.

As far as I can see, nothing is different except for the processor speed - which during non-functioning touch-screen consistently displays a slower CPU speed in cpuinfo (c. 750 MHz instead of c. 1000 MHz - not in front of me right now, but thereabouts).

Other than that, I see no discrepancies between the two dumps (used sort and diff to confirm this)

Does anyone have any tips I can try to see where I could glean any info (other /proc/* dumps or commands to troubleshoot)? Does the change in clock speed mean anything to anyone? (and where should I dump logs to if required?)

Thanks

~taikedz

EDIT: Yes, I know rebooting "solves" the issue in the immediate - but I'm more interested in troubleshooting tips than anyone actually having an answer.

Don't reboot directly but first shutdown then start it. This is probably some driver problem. Hope it helps!


How do i stop or turn off the x-server? I'm trying to do this tutorial :

Installing CUDA Under Ubuntu 10.04

I need the command that would completely stop/turn off the x-server. When i try to install the NVidia developer driver, I get a blue screen telling me

  Error: cant install with x-server running, please turn it off (something like that)

sudo service gdm stop worked at the time I guess, (didnt give any errors) but the x-server is still running. Is this the command I should be using?

You should use the service command instead of calling /etc/init.d:

sudo service gdm stop

And then to start it again:

sudo service gdm start

This will kill the server. Press Ctrl+Alt+F1 which moves you to the system console.

sudo /etc/init.d/gdm stop

When installation get complete, you are returned to same command prompt/terminal type screen. Now execute this command to start X SERVER back:

sudo /etc/init.d/gdm start

This will start the X SERVER and you gets the old UBUNTU LOGIN SCREEN