Sorry, this is going to be quite long.

First of all we need to understand that the RF TV Tuner itself decodes both audio and video at once. If it doesn't seem to "sound" may be because of your sound device isn't getting any sound signal from the tv tuner, which in the majority of the cases is achieved by plugging the proper cable into the right place, usually an aux-line, this way you can control the TV Tuner's volume in the sound mixer.

I suggest you to take a look at this answer, where I explain how to get audio to be directed to the sound device by dropping the next in the terminal:

tvtime | arecord -D hw:1,0 -r 48000 -c 2 -f S16_LE | aplay -

You will need to install tvtime (sudo apt-get install tvtime) in order to get the test running properly.

If tvtime isn't getting any signal from your TV Tuner, then we need to make sure that the software is gathering the proper data from the right device. Let's drop a query in the terminal which will let us see how many devices are connected to your computer, which can be used to gather images, use this command in a terminal:

ls -l /dev/video*

Results should be like this:

geppettvs@DYLAN:~$ ls -l /dev/video*
crw-rw----+ 1 root video 81, 0 2012-04-17 19:53 /dev/video0
crw-rw----+ 1 root video 81, 1 2012-04-17 19:53 /dev/video1
crw-rw----+ 1 root video 81, 2 2012-04-18 17:54 /dev/video2
geppettvs@DYLAN:~$

In my case, I have 3 video devices, of which one of them is the USB TV Tuner that I use for watching/recording live TV Shows/VTR/VCR/RF-DVD/Video converter and other RF Signals.

You should check any of them and make notes of your results in order to continue.

If you are satisfied with the signal, both audio and video can be recorded using the tvcap-script by Andreas Schalk, which code I place here for your convenience:

#!/bin/bash
#
#  tvcap-script by Andreas Schalk, easycap.blogspot.com (Dec. 2011)
#  This script is based an a template TV-script from Jose Catre-Vandis (Jan 2006).
#  The ascii artwork is based on a template i found here: http://www.retrojunkie.com/asciiart/electron/tv.txt
#  Contact: easycapdc60-blogspot@yahoo.de
#-----------------------------------------------------------------------------
#
#  FUNCTION: This script provides Zenity menues for viewing an capturing video with a tv-card on Linux.
#
#  Supported programs: MPlayer, MEncoder, VLC, Tvtime, Cheese und Sox
#
#-----------------------------------------------------------------------------
#
#  Basic options:
#
#  Change the following parameters for viewing/ capturing according to your needs
#
#-----------------------------------------------------------------------------
VERBOSE=1   # if '0', this script does not show messages window and does not ask for norm and input number anymore
NORM="PAL"  # preselect tv norm 'PAL' or 'NTSC'
INPUT_NR=0      # preselect input number of your easycap where video source is plugged in
input_width=720     # preselect width an height of video source (mplayer, vlc, mencoder)
input_height=576    # other possible combinations: 640/480; 320/240
ASPECT=169          # '169' (16:9) or '43' (4:3); this value affects video playback with mplayer or vlc only!
FREQ="48000"        # on soundproblems reduce audio frequency (44100 oder 32000 oder 8000)
TV_INPUT="no"       # if 'yes' the analogue antenna input of the tv-card will be used (mplayer only)
CHAN="chanlist=europe-west:channel=60"      # channel setting (nur mplayer/ mencoder) the analogue antenna input of the tv-card is used
NORM="PAL"          # preselect TV-norm 'PAL' oder 'NTSC'
INPUT_NR=1          # preselct the Input on the TV-card, where the videosource is plugged in ('0' normally is the antenna, '1' the first CVBS ...
#-----------------------------------------------------------------------------

MESSAGE=()
R_MESSAGE=()
EXITCODE=0

#-----------------------------------------------------------------------------

#-----------------------------------------------------------------------------
#   test videodevices
##-----------------------------------------------------------------------------

declare -a VIDEO_DEV

VIDEO_DEV=( TRUE    none
            FALSE   none
            FALSE   none
            FALSE   none
            )
i1=0;
i2=0;
while `test -e "/dev/video${i1}"`; do
  VIDEO_DEV[$i2+1]="/dev/video${i1}";
  i1=$[$i1+1];
  i2=$[$i2+2];
done
if [ "xnone" = "x${VIDEO_DEV[1]}" ]; then
  zenity  --error --timeout=5 --text "Cannot find /dev/video0!\n Script ends in 5 seconds" --title "No videodevice!";
  exit 1;
fi

if [ "x${VIDEO_DEV[$i2+1]}" = "xnone" ];  then
    VIDEO_DEV[$i2]="" && VIDEO_DEV[$i2+1]="" && VIDEO_DEV[$i2+2]="" && VIDEO_DEV[$i2+3]="" && VIDEO_DEV[$i2+4]="" && VIDEO_DEV[$i2+5]="";
fi

DEV_VIDEO=$(zenity --list --text "Select videodevice" --radiolist --column "Choice" --column "Device" ${VIDEO_DEV[@]}) || exit 0

if [ ${VERBOSE} = 1 ]; then
#-----------------------------------------------------------------------------
#  select TV norm
#-----------------------------------------------------------------------------
title="Select tv norm"
NORM=`zenity --title="$title" --list --radiolist --column="Choice" \
    --column="Norm" --column="Description" \
    TRUE "PAL" "PAL Norm" \
    FALSE "NTSC" "NTSC Norm" \
    ` || exit 0
fi
#-----------------------------------------------------------------------------
#  select Input number
#-----------------------------------------------------------------------------
title="Select Input NR"
INPUT_NR=`zenity --title="$title" --list --radiolist --column="Choice" \
    --column="Input NR" --column="Description" \
    TRUE "0" "Input 1 (TV)" \
    FALSE "1" "Input 2" \
    FALSE "2" "Input 3" \
    FALSE "3" "Input 4" \
    FALSE "4" "Input 5" \
    FALSE "5" "Input 6"
    ` || exit 0
#-----------------------------------------------------------------------------

#-----------------------------------------------------------------------------
#  Check if snd_usb_audio module is loaded
#-----------------------------------------------------------------------------
SND_USB=`lsmod | grep snd_usb_audio | wc -l`
if  [ "${SND_USB}" -ge "1" ]; then
#  MESSAGE=("${MESSAGE[@]}" "\nNOTE: snd_usb_audio module was loaded and may conflict with your USB capture device")
   zenity  --info --text "NOTE: The snd_usb_audio module was loaded\nand may conflict with your USB capture device.\n \nIf sound problems appear,\nplug out your USB capturedevice and run\n rmmod snd_usb_audio \nas root in the terminal!" --title "Snd_usb_audio module loaded!"
fi

#-----------------------------------------------------------------------------
# test and select soundcard
#-----------------------------------------------------------------------------

if `test ! -e /dev/dsp` && [ -z "`ls -1 /proc/asound`" ]; then
    if_audio="no";
    echo "No soundcard detected";
    MESSAGE=("${MESSAGE[@]}" "Note: No soundcard can be found!\nSound is not supported.\n");
else
if_audio="yes"
declare -a SOUND_DEV

SOUND_DEV=( FALSE   /dev/dsp    OSS
            FALSE   card1   ALSA
            TRUE    card2   ALSA
            FALSE   card3   ALSA
            )

test ! -e /dev/dsp && echo "No dsp" && SOUND_DEV[0]="" && SOUND_DEV[1]="" && SOUND_DEV[2]=""

ALSA_CARD=$(cat /proc/asound/cards | cut -d":" -f1 -s)
declare -a ALSA_CARDS
ALSA_CARDS=(${ALSA_CARD})

i5=1
for P in ${ALSA_CARDS[@]}; do
    ALSA_NAME=$(echo ${ALSA_CARDS[$i5]} | tr -d [=[=] );
    SOUND_DEV[$i5+3]=$ALSA_NAME
    if [ "x${ALSA_NAME}" = "x" ];  then
    SOUND_DEV[$i5+2]="" && SOUND_DEV[$i5+3]="" && SOUND_DEV[$i5+4]=""
    fi
    i5=$[$i5+3];
done
fi

DEV_AUDIO=$(zenity --list --text "Select soundcard" --radiolist --column "Choice" --column "Device" --column "Type" ${SOUND_DEV[@]}) || exit 0

if [ $DEV_AUDIO = "/dev/dsp" ]; then
    AUDIO_TYPE="oss"
    else
    AUDIO_TYPE="alsa"
fi
#-----------------------------------------------------------------------------

#-----------------------------------------------------------------------------
#   test, if devicenodes are read- and writable for unprivileged users
#-----------------------------------------------------------------------------

if [ -r ${DEV_VIDEO} ] && [ -w ${DEV_VIDEO} ]; then
MESSAGE=("${MESSAGE[@]}" "\nSUCCESS! ${DEV_VIDEO} is read- and writable!\n")
elif [ -e ${DEV_VIDEO} ]; then
zenity --info --text "Cannot access ${DEV_VIDEO}!\nRun 'sudo chmod a+rw ${DEV_VIDEO}'\nin the terminal!" --title "Message"
EXITCODE=1
fi

    if [ -r ${DEV_AUDIO} ] && [ -w ${DEV_AUDIO} ]; then
    MESSAGE=("${MESSAGE[@]}" "\nSUCCESS! ${DEV_AUDIO} is read- and writable!")
    elif [ -e ${DEV_AUDIO} ]; then
    zenity --info --text "\nCannot access ${DEV_AUDIO}!\nRun 'sudo chmod a+rw ${DEV_AUDIO}'\nin the terminal!" --title "Message"
    MESSAGE=("${MESSAGE[@]}" "\n\nCannot access ${DEV_AUDIO}!\nRun 'sudo chmod a+rw ${DEV_AUDIO}'\nin the terminal!!")
    if_audio="no"
    fi
#-----------------------------------------------------------------------------

#-----------------------------------------------------------------------------
#  find executable programs
#-----------------------------------------------------------------------------
PROG_LIST=( TRUE    vlc     #
            FALSE   mplayer     #
            FALSE   cheese      #
            FALSE   tvtime      #
            FALSE   mencoder    #
            FALSE   sox         #
            )

PROGS=(vlc mplayer cheese tvtime mencoder sox)
i4=0
for P in ${PROGS[@]}; do
            PROG=`which $P`
            if [ "x" = "x${PROG}" ] || [ ! -x ${PROG} ]; then
            echo "Cannot find or execute $P. Is t installed?"
            MESSAGE=("${MESSAGE[@]}" "\nCannot find or execute $P. Is it installed?")
            PROG_LIST[$i4]=""
            PROG_LIST[$i4+1]=""
                if [ "${PROG_LIST[11]}" = "" ]; then
                echo "Sox is needed for sound with tvtime!"
                MESSAGE=("${MESSAGE[@]}" "\nSox is needed for sound with tvtime!")
                fi
            fi
            i4=$i4+2
done
PROG_LIST[10]=""        # Sox does not show up on list
PROG_LIST[11]=""        #
#-----------------------------------------------------------------------------

#-----------------------------------------------------------------------------
#  messages are displayed and script ends
#-----------------------------------------------------------------------------
if [ ${EXITCODE} = 1 ]; then
    MESSAGE=("${MESSAGE[@]}" "\nScript ends")
fi
echo ${MESSAGE[*]}
#########################
if [ ${VERBOSE} = 1 ]; then
zenity --height="50" --info --text "${MESSAGE[*]}" --title "Messages"
fi

if [ ${EXITCODE} = 1 ]; then
    exit 1
fi
#-----------------------------------------------------------------------------

#-----------------------------------------------------------------------------
#  create logfile
#-----------------------------------------------------------------------------
LOGFILE="./test`echo "${DEV_VIDEO}" | sed -e "s,/dev/,," - `.log"

# echo "Log file is:  ${LOGFILE}"
#-----------------------------------------------------------------------------

#-----------------------------------------------------------------------------
#  zenity list - program choice
#-----------------------------------------------------------------------------

view_cap=$(zenity --list --width=250 --height=400 --text "  ___________\n |  .----------.  o|\n | |   Easy  | o|\n | |   CAP_  | o|\n |_\`-----------´ _|\n   ´\`          ´\`\\nTv-norm: $NORM  Input-Nr:$INPUT_NR\nVideodevice: $DEV_VIDEO $input_width x $input_height \nAudiodevice: $AUDIO_TYPE $DEV_AUDIO $FREQ Hz\nIs audio on? $if_audio\nLogfile: $LOGFILE " --radiolist --column "Choice" --column "program" ${PROG_LIST[@]}) || exit 0

#-----------------------------------------------------------------------------

#-----------------------------------------------------------------------------
#  mplayer command
#-----------------------------------------------------------------------------
if [ "alsa" = "${AUDIO_TYPE}" ]; then
M_AUDIO="buffersize=16:alsa:amode=1:forcechan=2:audiorate=${FREQ}:adevice=plughw.${DEV_AUDIO}"
elif [ "oss" = "${AUDIO_TYPE}" ]; then
M_AUDIO="adevice=${DEV_AUDIO}"
fi

if [ "$NORM" = "PAL" ]; then
    fps_count=25
else
    fps_count=30
fi

if [ "$ASPECT" = 169 ]; then
    M_ASPECT="-aspect 1.78"
#   elif [ "$ASPECT" = 43 ]; then
#   M_ASPECT="-aspect 1"
    else
    M_ASPECT=""
    fi

if [ "yes" = "${TV_INPUT}" ]; then
M_VIDEO="${CHAN}"
elif [ "no" = "${TV_INPUT}" ]; then
M_VIDEO="norm=${NORM}:width=${input_width}:height=${input_height}:outfmt=uyvy:device=${DEV_VIDEO}:input=${INPUT_NR}:fps=${fps_count}"
fi

#echo $M_VIDEO
#echo $M_AUDIO
#echo $view_cap

if [ "mplayer" = "${view_cap}" ]; then

if [ "$if_audio" = "yes" ]; then
1>${LOGFILE} 2>&1 \
mplayer tv:// -tv driver=v4l2:${M_VIDEO}:${M_AUDIO}:forceaudio:immediatemode=0 -hardframedrop ${M_ASPECT} -ao sdl, ${AUDIO_TYPE} -msglevel all=9

elif [ "$if_audio" = "no" ]; then
1>${LOGFILE} 2>&1 \
mplayer tv:// -tv driver=v4l2:${M_VIDEO} -hardframedrop ${M_ASPECT} -msglevel all=9 -nosound
fi
fi
#-----------------------------------------------------------------------------

#-----------------------------------------------------------------------------
#  vlc command
#-----------------------------------------------------------------------------
if [ "vlc" = "${view_cap}" ]; then

    if [ "alsa" = "${AUDIO_TYPE}" ]; then
    V_AUDIO="//plughw:${DEV_AUDIO}"
    elif [ "oss" = "${AUDIO_TYPE}" ]; then
    V_AUDIO="//${DEV_AUDIO}"
    fi

    if [ "$NORM" = "PAL" ]; then
    V_NORM="pal"
    elif [ "$NORM" = "NTSC" ]; then
    V_NORM="ntsc"
    fi

    if [ "$ASPECT" = 169 ]; then
    V_ASPECT="--aspect-ratio=16:9"
    elif [ "$ASPECT" = 43 ]; then
    V_ASPECT="--aspect-ratio=4:3"
    else
    V_ASPECT=""
    fi

1>${LOGFILE} 2>&1 \
vlc -vvv v4l2://${DEV_VIDEO}:input=${INPUT_NR}:width=$input_width:height=$input_height:norm=${V_NORM} ${V_ASPECT} :input-slave=${AUDIO_TYPE}:${V_AUDIO} --demux rawvideo
fi
#-----------------------------------------------------------------------------

#-----------------------------------------------------------------------------
#  tvtime command
#-----------------------------------------------------------------------------
if [ "tvtime" = "${view_cap}" ]; then
    if [ "alsa" = "${AUDIO_TYPE}" ]; then
    T_AUDIO="-t alsa plughw:${DEV_AUDIO} -s2 -c 2 -r ${FREQ} -s2 -t alsa default"
    elif [ "oss" = "${AUDIO_TYPE}" ]; then
    T_AUDIO="-t raw -s2 ${DEV_AUDIO} -c 2 -r ${FREQ} -s2 -t ossdsp /dev/dsp"
    fi
echo $T_AUDIO
1>${LOGFILE} 2>&1 \
>./tvtime.err
(tvtime -d ${DEV_VIDEO} -i 0 -n "${NORM}" 1>/dev/null 2>>./tvtime.err) &
rc=1
while [ 0 -ne ${rc} ];
do
  tvtime-command run_command "(sox -c 2 -r ${FREQ} ${T_AUDIO} 1>/dev/null 2>>./tvtime.err)" 1>/dev/null 2>>./tvtime.err
  rc=$?
  if [ 0 -eq ${rc} ]; then break; fi
  sleep 0.5
done
fi
#-----------------------------------------------------------------------------

#-----------------------------------------------------------------------------
#  cheese command
#-----------------------------------------------------------------------------
if [ "cheese" = "${view_cap}" ]; then
1>${LOGFILE} 2>&1 \
cheese
fi
#-----------------------------------------------------------------------------

#-----------------------------------------------------------------------------
#  mencoder command - recording section
#-----------------------------------------------------------------------------

if [ "mencoder" = "${view_cap}" ]; then

#Auswahl des Seitenverhältnisses der Aufnahme?
title="Chose aspect of your target file!"
aspect_type=`zenity  --width="400" --height="220" --title="$title" --list --radiolist --column="Click Here" \
    --column="choice" --column="source >> target" \
    TRUE "1" "4:3 > 4:3"\
    FALSE "2" "4:3 > scale=16:9" \
    FALSE "3" "4:3 > crop borders=16:9" \
    ` || exit 0

if [ "$aspect_type" = "1" ]; then
    crop_scale="scale=640:480"
elif [ "$aspect_type" = "2" ]; then
    crop_scale="scale=720:406"
elif [ "$aspect_type" = "3" ]; then
    crop_scale="crop=720:406:0:72"
fi

#################################################################################
#Quality?
title="What quality do you want to record at ?"
qual_type=`zenity  --width="380" --height="380" --title="$title" --list --radiolist --column="Click Here" \
    --column="Record Time" --column="Description" \
    FALSE "500" "Passable Quality"\
    FALSE "900" "OK Quality"\
    FALSE "1100" "VHS Quality"\
    TRUE "1300" "SVHS Quality"\
    FALSE "1500" "VCD Quality"\
    FALSE "1800" "SVCD Quality" \
    FALSE "2000" "Very Good Quality"\
    FALSE "2500" "High Quality" \
    FALSE "3000" "Excellent Quality"\
    ` || exit 0

##################################################################################
#How Long?
title="How long do you want to record for ?"
time_type=`zenity  --width="380" --height="500" --title="$title" --list --radiolist --column="Click Here" \
    --column="Record Time" --column="Description" \
    FALSE "00:00:00" "unlimited"\
    TRUE "00:00:30" "30 seconds for testing"\
    FALSE "00:10:00" "0.2 hours"\
    FALSE "00:30:00" "0.5 hours"\
    FALSE "00:45:00" "0.75 hours"\
    FALSE "01:00:00" "1 hour"\
    FALSE "01:15:00" "1.25 hours"\
    FALSE "01:30:00" "1.5 hours" \
    FALSE "01:45:00" "1.75 hours"\
    FALSE "02:00:00" "2 hours" \
    FALSE "02:15:00" "2.25 hours"\
    FALSE "02:30:00" "2.5 hours" \
    FALSE "02:45:00" "2.75 hours"\
    FALSE "03:00:00" "3 hours" \
    FALSE "03:15:00" "3.25 hours" \
    FALSE "03:30:00" "3.5 hours" \
    ` || exit 0

#M_TIME="-endpos $time_type"

#################################################################################
#user must enter a filename
filedate=$(date +%F_%H:%M-%S)
title="Please enter a filename for your recording, no spaces"
file_name=`zenity  --width="480" --height="150" --title="$title" --file-selection --save --confirm-overwrite --filename="tvcap_$filedate"` || exit 0

###########################################################################################
# summary
R_MESSAGE=("${R_MESSAGE[@]}" "\nRecording options:")
R_MESSAGE=("${R_MESSAGE[@]}" "\nRecording audio: $if_audio")
R_MESSAGE=("${R_MESSAGE[@]}" "\nRecording from Input $INPUT_NR - Norm: $NORM $fps_count fps")
R_MESSAGE=("${R_MESSAGE[@]}" "\nCrop and scale options: $crop_scale")
R_MESSAGE=("${R_MESSAGE[@]}" "\nEncoding quality: $qual_type kb/s")
R_MESSAGE=("${R_MESSAGE[@]}" "\nRecording time:$time_type hours")
R_MESSAGE=("${R_MESSAGE[@]}" "\nFile name: $file_name.avi ")

echo ${R_MESSAGE[*]}

if [ ${VERBOSE} = 1 ]; then
zenity --info --text "${R_MESSAGE[*]}" --title "Recording options"
fi
#-----------------------------------------------------------------------------

#-----------------------------------------------------------------------------
#  mencoder line
#-----------------------------------------------------------------------------
if [ "$if_audio" = "yes" ]; then

zenity --info --title="Start recording with audio" --text="Press OK to start."

mencoder tv:// -tv driver=v4l2:norm=$NORM:width=$input_width:height=$input_height:outfmt=uyvy:device=${DEV_VIDEO}:input=${INPUT_NR}:fps=$fps_count:${M_AUDIO}:forceaudio:immediatemode=0 -msglevel all=9 -ovc lavc -ffourcc DX50 -lavcopts vcodec=mpeg4:mbd=2:turbo:vbitrate=$qual_type:keyint=15 -vf pp=lb,$crop_scale -oac mp3lame -endpos $time_type -o $file_name.avi | tee ${LOGFILE} | zenity --progress --pulsate --auto-close --auto-kill --text="Processing Video - length: $time_type H:M:S"

zenity --info --title="Job complete" --text="The recording is now complete."

elif [ "$if_audio" = "no" ]; then

zenity --info --title="Start recording without audio" --text="Press ok to start recording"
1>${LOGFILE} 2>&1 \
mencoder tv:// -tv driver=v4l2:norm=$NORM:width=$input_width:height=$input_height:outfmt=uyvy:device=${DEV_VIDEO}:input=${INPUT_NR}:fps=$fps_count -msglevel all=9 -nosound -ovc lavc -ffourcc DX50 -lavcopts vcodec=mpeg4:mbd=2:turbo:vbitrate=$qual_type:keyint=15 -vf pp=lb,$crop_scale -endpos $time_type -o $file_name.avi | tee ${LOGFILE} | zenity --progress --pulsate --auto-close --auto-kill --text="Processing Video - length: $time_type H:M:S"

zenity --info --title="Job complete" --text="The recording is now complete."

fi

fi
exit 1

Simply copy/paste all this code in a file called tvcap-script.sh, give the execution permissions and run it in a terminal. The process is quite easy and I am going to explain as follows:

1.- After pressing Enter, you will be asked for the capture source, and dependind on the device's location (tested before), you can have -as in my case- several video sources, I am using the /dev/video2 for this example, which refers to my USB TV Tuner. Note that this screenshot didn't get the window decorator but the options and the "OK" button can be seen right there.

2.- Now we need to define the norm, in Mexico we use NTSC, and unless you wish to capture  your video using a different norm with square aspect ratio you should not use PAL, which can indeed harm a bit your video quality. It also depends on where you live and the norm of your country.

3.- My TV Tuner is having several inputs, yours can have a different amount of inputs, check it out and run as many tests as you need to determine which one is the best for your capture. I am going to use the one that refers to TV. (Input 1 (TV))

4.- Next, you may (or not) be warned and offered for a solution if something goes wrong during the sound capture (both audio and video are going to be captured at once but if your snd_usb_audio module has already been loaded it may crash the audio capture and thus the video capture itself)

5.- My TV Tuner features support for several audio inputs, which includes the integration with the embedded sound device in my motherboard (via connecting a cable to the aux-line and controlled by sound mixer), you check which one is the best for you and remember that the defaults are usually marked as the "best for you".

6.- If everything is going fine, you will see a small window with a message that reads something like this:

  "SUCCESS! /dev/video2 is read- and writable!"

click "OK" to continue.

7.- After that, you can choose from the list of recording options available on your system. I have installed what you can see in the next screenshot. Anyone is valid and the quality doesn't reflect major changes but I personally prefer mencoder. If you don't have any of these installed you should install it in order to run your tests.

8.- After you have chosen your encoding software preference (in the previous step) you will be asked for the aspect ratio. If you don't have experience on this just leave it as is. It normally defaults to which better fits your TV Tuner signal.

9.- Based on your choice related to the aspect ratio, you will have several options for the video quality, also based on bitrate, the description in the next window is very specific. Remember that: the higher bitrate (best quality) the video file size can become a huge amount.

10.- After that, we need just to choose how long will our video capture be. There are several presets, I have chosen "30 seconds for testing" in this example but you can choose any or even choose "unlimited" in order to you decide when to stop the recording.

11.- Next, you will be asked for a file name, giving one by default, which you can change in this screen.

12.- You will be prompted to check your "Recording options" in the next screen, just click "OK".

13.- Just one more click to start.

14.- When recording, the terminal may show some activity, and a small window like this:

15.- At the end of the process, you will receive a confirmation window.

And... that's it...

You can cancel the recording or the process itself by pressing ESC at any moment, there will be no changes at all.

At the end of the recording, you will have the video in the place that you choose in the step 11, in companion with a log file with a name like: "testvideo0.log" or something like that.

This is the easiest way to encode from RF Signal TV Tuners, gathering both audio and video in the same file.

I have another process which is achieved using a python process which features a GUI in which you can handle several useful things, like changing the channel, run pre-recording tests and even record but sometimes it drops me failures. If you wish it please let me know how can I reach you. I don't want to write parchments or a bible... LOL!

Good luck!


I will go ahead and post it just in case....Please note however that these instruciton install Java7 NOT Java6

cut and paste from http://www.webupd8.org

  Install Oracle Java 7

  For most stuff, OpenJDK/JRE is enough (and you can install it using
  Ubuntu Software Center), but in case you really need Oracle
  (previously Sun) Java 7, you can install it (this will install JDK/JRE
  and the browser plugin) in Ubuntu using the WebUpd8 Java PPA

  in terminal type

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

This is a excerpt of my answer to this question.

The PPA that you install with thesecommands only points to the Java website to make installing easier, it does not contain Java itself. Oracle changed the license and now it can not be hosted anywhere  and can only be downloaded directly from Oracle..

HERE is an older post from the same site that gives more information on this change as well as more information on Java7 itself and how to remove it , check for and select which version is running.

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


You cannot call xbacklight in rc.local, because rc.local is not running in the X environment.

Add this command to your startup programs (gnome-session-properties):

xbacklight -set 50%

This will work


Is there a taskbar applet to show the status of a remote host?

I think the simplest approach is to forget about taskbar applets or detecting the state of the work machine, and use a third-party syncing service. Ubuntu One is the native client and Dropbox is another fine choice. Configure the same account on the home and work machines and you will have access to the files whenever you like.

There are some caveats to this. First, you said you want to 'unobtrusively' copy files. If someone is sitting at the work machine and you save a new file (or version) they may see the Dropbox icon change as it syncs, or an Ubuntu one NotifyOSD message briefly show. These aren't secret or stealthy ways of moving files, if that's important to you.

The second issue is security. If you have a requirement to encrypt the files in transit (you mentioned SSH) then you should know that neither service encrypts data by default. That's not too hard to overcome. This answer by @Uli explains a method I use and recommend.


"Airport Express" server in Ubuntu server

It is technically possible to stream audio to an Airport Express device from a server but there are so many limitations that you probably dont want to go through the pain of installing this.

The recommended way to get audio streaming without issues is to have the media player (presumably iTunes) and the streaming running both on Apple systems. They do use a proprietary non-open streaming protocol which causes issues and makes things needlessly complicated, esp. when it comes to controlling from an iPhone or a Mac.

The way to acchieve this with least headaches is to have your Ubuntu as a file server for  audio files to be accessed from the MAC. Only then you will probably be able to get a smooth, uninterrupted and lagless streaming experience, fully controllable from the Mac.

Nevertheless here's a very basic outline of steps to take to stream audio to an Airport Express from an Ubuntu server:

Install ALSA, and Pulse Audio including tools on the server.
Install and load the pulseaudio-module-raop.
Load your Airport Express to the RAOP module with the following command:

 pactl load-module module-raop-sink sink_name=RAOP sink_properties=device.description="AirportExpress" server=<IP_of_AEX>:<Port>

Replace <IP_of_AEX> with the IP you assigned to the Airport Express, and optionally give a <Port> (defaults to 5000)
Make this sink your default:

pacmd set-default-sink RAOP

Run and control a command line media player through SSH from the MAC (or iPhone if you have an SSH client installed there).

Note that when you do not run the server but a desktop flavour of Ubuntu your approach to this will be different:

How do I stream music to my AirTunes?


man date says:

SYNOPSIS
       date [OPTION]... [+FORMAT]

It should work either way, but you're on the safe side using date the way the manpage tells you:

ddd=$(date -d "-1 month" +%Y-%m)

With a script

#!/bin/bash
ddd=$(date -d "-1 month" +%Y-%m)
xmessage -timeout 10 $ddd

and the cronjob line

* * * * * DISPLAY=:0 /path/to/script.sh

it works very well on my system – see How to start a GUI application from cron? and the Cron HowTo.


Wifi not working Ubuntu 16.04 after update

You installed a 3rd party driver to get the USB adapter working.

Secure Boot does not let unsigned kernel modules load.

I suggest keeping the Secure Boot disabled if you are using unsigned modules. This feature is useless.

It is possible to sign the module and put the signature into UEFI. It is also possible to make a script that will automatically sign modules on DKMS updates.

But it is very complex and is not worth the effort.


Cropping Images using Command Line Tools Only

Here is a workaround using convert from image magick pack.

sudo apt-get install imagemagick

For a picture image.jpg

$ identify image.jpg

image.jpg JPEG 720x482 720x482+0+0 8-bit DirectClass 100KB 0.000u 0:00.009

As shown above, the input image is 720x482px.

Now to do cropping you have to determine two factors:

starting point of the cropping (includes 2 directions)
The cropped rectangle size (Here you can include the other directions)

Now back to the image image.jpg above, I want to crop:

top 5px
bottom 7px
right 14px
left 3px

then you could do it with (widthxheight+left+top / wxh+l+t format):

convert image.jpg -crop 703x470+3+5 output.jpg

Now

$ identify output.jpg

output.jpg JPEG 703x470 703x470+0+0 8-bit DirectClass 102KB 0.000u 0:00.000


bluetooth error on recovery from suspend, 18.04

I started playing around with unloading/reloading modules in pulseaudio and discovered that I can fix the problem without completely killing pulseaudio. Just reloading the module-bluez5-discover module fixes it.

pactl unload-module module-bluez5-discover
pactl load-module module-bluez5-discover

If I run this after waking from suspend, everything works fine. And even if I try to pair and get the error, running this will fix the problem right away.

It also doesn't have the problems with requiring Chrome/Electron apps to be restarted.


When you add new apps using the Software Center, with a command in a terminal (such as sudo apt update && sudo apt install whatever)  or the Synaptic Package Manager (my fave), a dependency check runs then all required files for the "package" (AKA app) are installed to your system. That's the easy part.

Depending on the nature of the package & the files it has, the app is placed in different directories. Welcome to Linux.  (Actually, this is the same under the hood in MacOS X, you're just insulated from it by the MacOS interface.)

To see where the different files reside in your filesystem after installation, you can open Synaptic and right-click the package + details to see what files are in it.

Executable files in a package often live in directories with bin in their path, e.g.

 /bin
 /usr/bin
 /usr/local/bin
 /usr/local/sbin
 /usr/sbin

where / means the root directory - the parent to all directories in your filesystem. They can also be installed underneath /opt .

Your environmental PATH variable shows which directories are searched for executables whenever you execute a program; in a terminal do echo $PATH to see that.

Once you've found the executables for the apps, you can make a directory to hold symlinks to the important apps, then make symlinks, following https://askubuntu.com/a/56340/197910


How can I manually import a boot-image in MAAS?

According to this bug report, the downloading progress feature was added since MAAS 1.7.0.

However, if you use Ubuntu Trusty, the current MAAS version is 1.5.x.
You may try to use the newer version MAAS of PPAs of maas maintainers .
For example, you may try Experimental PPA, dailybuild PPA, or Stable PPA.

If you have any problem to use PPAs, please let me know.


SSH client: port knocking (execute command before connecting)

You can also try to use the option ProxyCommand.

It gives you the ability to control the command used to connect to the server; sounds troublesome, but I haven't found any problem with it yet.

From the ssh_config docs:

ProxyCommand
         Specifies the command to use to connect to the server.  The command string extends to the end of the line, and is executed using the user's shell ‘exec’ directive to avoid a
         lingering shell process.

         In the command string, any occurrence of ‘%h’ will be substituted by the host name to connect, ‘%p’ by the port, and ‘%r’ by the remote user name.  The command can be basically
         anything, and should read from its standard input and write to its standard output.  It should eventually connect an sshd(8) server running on some machine, or execute sshd -i
         somewhere.  Host key management will be done using the HostName of the host being connected (defaulting to the name typed by the user).  Setting the command to “none” disables
         this option entirely.  Note that CheckHostIP is not available for connects with a proxy command.

         This directive is useful in conjunction with nc(1) and its proxy support.  For example, the following directive would connect via an HTTP proxy at 192.0.2.0:

            ProxyCommand /usr/bin/nc -X connect -x 192.0.2.0:8080 %h %p

Example

Lets say you have a command or script that does the knocking IN YOUR PATH: knock.sh <host> <port1 port2 ... portX>

And you want to connect to some host: myhost.net

You can add the following to your ~/.ssh/config

Host thehost
    HostName myhost.net
    ProxyCommand bash -c 'knock.sh %h <port1 port2 ... portX>; nc %h %p'

%h => the hostname (myhost.net)
%p => the port (22)

And you can connect to your host with: ssh user@thehost

You should also be able to use the option directly from the command line with:
ssh -o ProxyCommand="bash -c 'knock.sh %h <port1 port2 ... portX>; nc %h %p'" user@myhost.net

Notes

If the program writes data to stdout by default it gets hidden, if you need to see it, add -v after ssh.

Also note that ssh has to execute the knocking before performing the connection, so the total time it will take to complete the connection will be greater.

I have a current configuration working with port forwarding enabled and no problem with it yet.


Accidentally borked system by pressing Ctrl + C during sudo apt upgrade. How do I fix it?

I would boot a 'live' medium (eg. your Ubuntu install media) and fsck your system.  fsck is a file-system-check command that will check for, then fix any errors in your file-system.  (depending on what fs I'm using, I sometimes use xfs_check but I'm betting fsck will be right for you).

My first purpose would be to hopefully get so I can login to recovery or runlevel 1 (text terminal only and not use gui).

I would login (text term or runlevel 1) and look for the last package that was being installed in your logs (I'd stat /var/log/apt/history.log hoping it'd have a time/date stamp that matches your ^C then view it's contents), taking note of the last installed package (even last 2-3).

I would then sudo apt upgrade and hope it would continue.  If it complains and wants me to run any dpkg-reconfigure commands, I'd do what it wants and repeat the sudo apt upgrade until all upgrades were complete (0 remain). Myself I'd probably sudo apt dist-upgrade as well.

When completed i'd possibly sudo apt install --reinstall the aborted package (one being installed when you ^C that was hopefully found & noted earlier).

Of course I'd evaluate this by what I saw in messages as steps run. At this stage it would include a reboot & use of system normally at first to test how it goes.

If I wasn't completely happy with the results, or unsure about anything; I'd consider install --reinstall those packages, or just go to a whole Ubuntu re-install.

My re-install choice would be using "Something else" selecting my partitions and ensuring I had 'no-format' which can be quicker.  This option takes note of added packages, erases system directories, then installs, adds back your added software [packages] without touching your user directories or files. I want to trust my systems, so this would be my fall-back if I wasn't happy with any step.


Is it dangerous to recover my old home directory?

Don't reuse it. There are configurations and caches in ~/ that could have caused your initial issue (or cause further issues on the new install).

Instead of copying everything or using the old directory, only copy the files you need. Or, keep the directory somewhere easy to access and just take directly from that. It's just not a good idea to reuse a home directory.


I want to allocate 100GB for a new partition

Yes it appears that you can shrink the partition /dev/sda1 to make a 100GB partition for /mysql.  There are many answers on here that will instruct you how to shrink partitions with gparted.

You shouldn't need to change your `/etc/fstab' as long as your system partion is still the first partition on the disk.

So your only extra task is how you give the new partition to mysql.

To fix the mis-alignment problem, from the Live boot, in gparted, you just delete the swap partition, then delete the extended partition, then add them back.


You are right, fuse initiates the mount first, then initiates the ssh process. This causes a problem for you, since by default ssh reads ~/.ssh/ssh_config, ~/.ssh/known_config, ~/.ssh/id_* files from user home. This behavior can be changed:

~/.ssh/ssh_config is the default per-user configuration file. An alternative per-user configuration file can be specified using -F option, or use -F /dev/null to specify no per-user configuration file.
~/.ssh/known_config is used to store and check host keys. You can use -o UserKnownHostsFile=/dev/null, and either manually add the host key to /etc/ssh/ssh_known_hosts or use -o StrictHostKeyChecking=no.
~/.ssh/id_* files are identity files by default used for client authentication. If you want to authenticate using an identity file, you need to keep it outside the home directory and use -o IdentitiesOnly=yes -o IdentityFile=<path to private key>. Or else you can authenticate interactively if you use -o IdentitiesOnly=yes -o IdentityFile=/dev/null -o PubkeyAuthentication=no.

For example to mount home using sshfs, authenticating using password, without host key checking, run

sshfs user@server: ~/ -o nonempty -F /dev/null -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o IdentitiesOnly=yes -o IdentityFile=/dev/null -o PubkeyAuthentication=no


How to skip to a particular option in man pages?

You can search a man page using \{pattern}.

So in your example, do man ls then while in the man page \-l and press Enter. This will highlight all instances of -l.

You can toggle the highlight with Esc+u.

Pressing n moves the cursor to the next occurrence. Pressing Shift+n moves the cursor to the previous occurrence.


Can I create a new configuration file inside etc/apache2/sites-available or etc/apache2/sites-enabled after deleting it by accident?

Yes, that's perfectly fine. The sites-enabled configuration files are just a symbolic link to the files in sites-available dir.
Make sure the vhost configuration files have the dot conf extension.
Newer Apache server software versions are picky about that.
They will simply ignore the non dot conf vhosts file, and not really ring an alarm bell for you in the log files. (I noticed this first as a difference between Debian Wheezy and Debian Jessie apache2 configurations).
You can decide to use the a2ensite command, or create the symbolic link yourself.
For example :

sudo nano /etc/apache2/sites-available/mywebsite.conf

sudo a2ensite mywebsite

sudo apache2 reload

Or :

sudo nano /etc/apache2/sites-available/mywebsite.conf

sudo ln -s /etc/apache2/sites-available/mywebsite.conf /etc/apache2/sites-enabled/mywebsite.conf

sudo apache2 reload

Make sure to clean up possibly broken symbolic links in the /etc/apache2/sites-enabled/ directory.


18.04 Boot freezes at "Started Hold until boot process finishes up"

I had the exact same problem after a kernel upgrade. It turned out that my root partition was stuffed so much, it had no free space. I used the advanced mode menu to free up some space and restarted. It just worked afterwards.


Partially From: Whitelist IPs for ufw

1) Allow all connection from IP addresses

ufw allow from 10.10.0.1/16

replace with whatever subnet/IP you want

2b) block incoming traffic from IP

ufw deny from 10.10.0.1/16

replace with whatever IP/subnet you want

For outgoing traffic, check using ufw to block outgoing traffic to website

Simplified:

ufw deny out from any to 10.10.0.1

or, to allow out

ufw allow out from any to 10.10.0.1


Iriun Webcam Does not work on Ubuntu 20.04


I resized partition and deleted swap area , how do I update the /etc/fstab file to reenable swap?

The new line should look like this, given the above data:

UUID=a3a1b9ea-266d-47c8-955f-74a16e53a696 none            swap    sw              0       0

Basically, you just change the old UUID to the new one, and uncomment the line.


Remapping CapsLock to Control when using a PS2-to-USB adapter?

This turned out to be a hardware problem. At some point noticed that a different PS2-USB adaptor did not have that problem, switched to that brand, and the problem solved itself.

The device that works well is made (repackaged, really) by Belkin, and identifies itself as

ID 0d3d:0001 Tangtop Technology Co., Ltd HID Keyboard

(Yes, it only says "keyboard", but lsusb -v shows that it has both a keyboard and a mouse descriptor, obviously).


How to connect Nokia Lumia 730 to Ubuntu 15.04?

Wait for a release which contains the patches for these devices in libmtp or use android-file-transfer-linux.

Straight forward instructions:

  Building instructions

  Prerequisites

  For ubuntu and other debian-based distros use the following command:

sudo apt-get install build-essential cmake libqt4-dev ninja-build libfuse-dev

  …

  Building with ninja

mkdir build
cd build
cmake -G Ninja ..
ninja

  Then run: ./qt/android-file-transfer

  or…

  Installation

sudo ninja install

  Then run: android-file-transfer


There are two options for this:

Install wine (sudo apt-get install wine).
Install virtual box, install windows inside the virtual bpx and start using windows applications there.


Unable to install specific GNOME Shell extension

Works here on 3.16 (which I guessed you had originally as by default 15.10 should have 3.16 (see here for a reason))... I don't think it supports 3.18 from the extension page (When you have a 'unsupported' shell version for that extension, it won't give any informative errors, which is STUPID).

As a workaround (may not work), you can download the source of the extension from here (Click 'Download repository'), then execute build.sh in the extracted source's directory (cd into from termial, or use 'Open in terminal'). After that, you can extract the ShellTile@emasab.it.zip file to ~/.local/share/gnome-shell/extensions/.

Place it so the metadata file is at: ~/.local/share/gnome-shell/extensions/ShellTile@emasab.it/metadata.json. You need to ensure the metadata file contains your gnome shell version - example:

{
  "_generated": "Generated by SweetTooth, do not edit",
  "description": "A tiling window extension for GNOME Shell. Just move a window over another one, holding down the Control key, and you'll see the magic! Grouped windows minimize, resize, raise and change workspace together. Maximize a window to remove it from the group.",
  "gettext-domain": "shelltile",
  "name": "ShellTile",
  "settings-schema": "org.gnome.shell.extensions.shelltile",
  "shell-version": [
    "3.6",
    "3.8",
    "3.10",
    "3.12",
    "3.14",
    "3.16",
    "3.18"
  ],
  "url": "https://bitbucket.org/emasab/shelltile",
  "uuid": "ShellTile@emasab.it",
  "version": 30
}

Here are various checks/workarounds if it supports your version (it doesn't in this case but help others):

Reload the browser page.
Ensure the Gnome Shell Integration plugin is enabled (check about:plugins in Firefox)
Check whether the extension is enabled with Gnome Tweak Tool or here
If you have not previously installed the extension it should show something like:

If it is installed and working you there will be a preferences icon
It'll be installed if this folder exists:

~/.local/share/gnome-shell/extensions/ShellTile@emasab.it

Give up, report a bug:

https://bitbucket.org/emasab/shelltile/issues?status=new&status=open


Ubuntu Server doesn't boot after initial install boot on external hard drive on ASUS G75V

I got it working by turning off UEFI mode during installation of Ubuntu server on the external hard drive. With this disabled I was able to install and then access GRUB2 from the boot menu and boot Ubuntu from there.


There is something laying on the remote machine's keyboard. How can I disable the key?

I was using the wrong keycode.  For u, the keycode was actually 30.
Running the command:

xmodmap -e 'keycode 30 = 0x0000'

disabled the key on the remote machine.
This doesn't prevent me from typing u on my end.


Use the tab key to select "OK"  and then enter


Installing Ubuntu on 24GB mSSD Hardware Acceleration Cache

Firstly if you are using 13.04 (or 12.10) then there's no need to disable secure boot - in fact Windows 8 won't boot with it disabled AFAIK.
When you boot from the CD and go into Files, is the SSD shown there?

You might also want to read this thread:
Installing Ubuntu Alongside a Pre-Installed Windows with UEFI


Unable to boot in to Windows 10 after installing Ubuntu & Mint

It's a UEFI system which means you can always access Windows by selecting "Windows boot manager" in the UEFI settings.

In order to have Windows added to the Grub menu, first you need to decide which one, Ubuntu or Mint, you want in control of Grub. Then boot the chosen distro, open a Terminal, and run sudo update-grub.

Additional information:

UEFI (Ubuntu Community document)

Installing Ubuntu Alongside a Pre-Installed Windows with UEFI


Why does the installation of Ubuntu is taking 4 hours?

It should take about half an hour to install Ubuntu. If it takes four hours, something has gone wrong. Make sure your checksums match before installing.


Problem (sorta) solved.
I realized that Wine does not really need an app icon, as it is basically used only ONCE for each Windows app.
So, it is no big deal to invoke Wine using "winecfg" from a terminal, set up the Windows app, and it's done.
 Then the Windows app(s) will appear in the Ubuntu app list.
One just has to remember how to invoke WINE!


I found a solution for the font size problem. I'm using the netbook-launcher-efl, which have two themes: alternative.edj and default.edj, both can be found under /usr/share/netbook-launcher-efl/data/themes. I have extracted the default theme with sudo edje_decc default.edj under /usr/share/netbook-launcher-efl/data/themes and then i've edited the file default/default.edc, lines 9,14 and 19 must be changed. I've changed the lines as follow:

Line 9: font_size=14 was replaced with font_size=10
Line 14: font_size=12 was replaced with font_size=9
Line 19: font_size=12 was replaced with font_size=9

Then i build the theme using sudo sh ./build.sh and copy the new generated default.edj to /usr/share/netbook-launcher-efl/data/themes

I still don't have a solution for the icon size, but this isn't now important. Here the new look:


Update For those that don't mind adding PPA's, packages are now available here for 14.04 & 14.10

PPSSPP has a Linux version. The instructions provided only work with the 64 bit version and you have to build the 32bit version yourself, although there is a promise that a .deb for Ubuntu/Debian users is on the way

Download the tar.gz from here

Extract to a place of your choice
You can now launch the application by double clicking the executable.

To create a launcher and make it searchable from the dash:

If you don't already have it installed then open Software Centre, search for and install 'Main Menu'

Open 'Main Menu' from the dash

Select a category where you would like to place your application (for this purpose I have selected 'games')

Click on new item, give your launcher a name i.e PPSSPP then in the command box click browse, navigate to the executable you have for PPSSPP, click open

At this point you can just click OK and your launcher will be created, however there is also the option to to give your launcher an icon (unfortunately no icons are included in the download)

To change the icon click on the 'springboard like logo to the left

you will then be able to select a logo from file or if you have your own navigate to that and select.
If you don't choose a different icon it will just default to the springboard.


Installing programs on persistent live disk

In the copy of the screen are missing the lines preceding:

Do you want to continue? [Y/n] Y
Setting up linux-image-5.0.0-36-generic (5.0.0-36.39~18.04.1) ...
Setting up initramfs-tools (0.130ubuntu3.9) ...

This leads me to believe you entered sudo apt upgrade. You can't do this with a persistent USB.

You can only do:

sudo apt update
sudo apt install <package_name>

Where <package_name> is not a linux kernel package such as linux_image or linux_header.

The problem is not based on your encrypted HDD because a Live USB will not see your HDD or any other drives / partitions until they are manually mounted.

Additionally make sure automatic upgrades are turned off in systems settings. From time to time use:

apt list --upgradable

Only select those packages with sudo apt upgrade <package_name> when they are not related to initramfs, grub, linux_image or linux_header. There may be other packages as well that should not be upgraded.


You have to copy that file into /etc/init/lightdm not /etc/lightdm/lightdm.conf.d folder.
Hopefully, this could solve your problem:

Run a startup script with lightdm


How to compile & install Emerald window manager in Ubuntu 13.04 64bit?

how to compile under 13.04

The keypart of your compile error was the following:

/usr/bin/ld: main.o: undefined reference to symbol 'exp@@GLIBC_2.2.5'
/usr/bin/ld: note: 'exp@@GLIBC_2.2.5' is defined in DSO /lib/x86_64-linux-gnu/libm.so.6 so try adding it to the linker command line

This shows that you need to link to the correct library - you do this by slightly altering the ./configure command.

The instructions you have linked to also need an additional change to the ./configure command to ensure that the path to the default libraries are known.

To summarise the compilation:

sudo apt-get install git autoconf libtool libwnck1.0-cil-dev libwnck-dev intltool libdecoration0-dev gawk compizconfig-settings-manager

wget cgit.compiz.org/fusion/decorators/emerald/snapshot/emerald-0.9.5.tar.gz

tar -zxvf emerald-0.9.5.tar.gz && cd emerald-0.9.5/

./autogen.sh
make clean
make distclean
./configure --prefix=/usr --libdir=/usr/lib${LIBDIRSUFFIX} LIBS='-ldl -lm'
make
sudo make install

some pretty pictures

After running emerald --replace & in a terminal you should see the translucent emerald beryl red window decoration theme


Browsers not able to stream video in ubuntu

Install the ubuntu-restricted-extras. It contains the necessary codecs.


How to send commands to terminal and receive data from it?

I created a program invoking a program invoking a program. The key line in the first is:

execl("/usr/bin/x-terminal-emulator", "/usr/bin/x-terminal-emulator",
        "-e", "/home/kkk/build-untitled-Desktop-Debug/untitled",
        "/home/kkk/Downloads/1.pdf", (char*) NULL);


Seagate HDD Error: Unable to mount and see the data inside it

In issues like this one of the most helpful tools if you have access to a Windows PC is chkdsk. I think it should be used as chkdsk /f [drive_letter] to solve any problems related to MFT. NTFS drives do stuff like this very often.

Or else you can use ntfsfix from an Ubuntu PC. Make sure you have installed ntfs-3g first.
Then run :

sudo ntfsfix /dev/your_drive

But i'm not sure this'll work in your case. But most of the time it should work. Good luck. :)


copying files to usb flash drive overwrite it's partition table and file system formatting

My guess is that the file system was not healthy to start with. fat32 is a relatively simple file system and quite prone to corruption. Linux will never write "like that" on a partition table and over the file system.

Be very careful in removing an USB drive. Always unmount in the file manager first, and wait some time before physically removing the USB drive. Most desktop environments provide a notification when the drive is fully unmounted and ready to be physically removed.
Regularly have the file systems on any removable drive checked. In contrast to internal drive, there is no automatic file system check for removable drives. In practice, many drives remain unchecked for a long time. System file corruptions may be introduced and build up.


How to fix my Ubuntu-sessions after a weird crash?

I just rebooted and the issue solved itself seemingly out of nowhere. The best explanation I've got is that I've tinkered with focalgdm3 some more. Specifically, I set a new background for the startup screen—the old one had been removed, as explained in my question.
Now the startup screen loads just fine. I'mgoing to mark this question as solved, but I haven't even started to figure out what the problem was in the first place. Hopefully this is it.


Change the grub.cfg "root=/dev/mapper/ubuntu--vg-root" to "root=UUID=XXXX"
Added "vgchange -a y" to somewhere before mountroot

Basically the root cause is "/dev/mapper/ubuntu--vg-root" is not fully ready when the root got checked. In some way, vgchange command could trigger the lvm updated and shows in /dev/mapper. Suggested use "UUID" instead of using dev mapper name to make it more general.


First, check the settings in the router. WPA2-AES is preferred; not any WPA and WPA2 mixed mode and certainly not TKIP. Second, if your router is capable of N speeds, you may have better connectivity with a channel width of 20 MHz in the 2.4 GHz band instead of automatic 20/40 MHz, although it is likely to affect N speeds. I also have better luck with a fixed channel, either 1, 6 or 11, rather than automatic channel selection. Also, be certain the router is not set to use N speeds only; auto B, G and N is preferred. After making these changes, reboot the router.

Next, I recommend that your regulatory domain be set explicitly. Check yours:

sudo iw reg get

If you get 00, that is a one-size-maybe-fits-all setting. Find yours here: http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 Then set it temporarily:

sudo iw reg set IS

Of course, substitute your country code if not Iceland. Set it permanently:

gksudo gedit /etc/default/crda

Use nano or kate or leafpad if you don't have the text editor gedit.

Change the last line to read:

REGDOMAIN=IS

Proofread carefully, save and close the text editor.

Next, I'd set IPv6 to Ignore in Network Manager: http://docs.fedoraproject.org/en-US/Fedora/18/html/Installation_Guide/images/netconfig/network-connections-ipv6-ignore.png  This example is for ethernet, but you want wireless.

If these changes do not help, please try:

sudo -i
echo "options ath9k nohwcrypt=1"  >  /etc/modprobe.d/ath9k.conf
exit

Reboot and let us know how it's working.


Lenovo E580 volume mute button LED not working on Xubuntu 18.04

This works, with and without headphones, Volume mute button LED turns on and off.

alsactl restore

Then reboot, full shutdown.

Start alsamixer in the terminal.
Make sure you've selected the internal sound card (not the HDMI or external ones) by pressing F6.
Try to locate a setting for LEDs, presented between the sliders, something like Mute-LED Mode. Use the → to move to the right in case you have more sliders than fit on the screen.
Move to the "slider" and adjust it using the ↑ and ↓ keys in order to find a Follow Master option (or alike). Also try to toggle the LED state manually by flipping the setting On/Off.
Now move to the Master slider and press M to mute/unmute. The LED should toggle with it.
Try to use the hotkeys to mute/unmute. The LED should toggle with it again.

Reference

Apart from this all the hardware was recognised during install and the system runs stable, all hotkeys work as expected, super happy with the E580 running Kubuntu.


Although I probably would have used mount (as described in walinator's answer) myself, according to man mount we should get out of the habit:

   The listing.
          The listing mode is maintained for backward compatibility only.

          For more robust and customizable output  use  findmnt(8),  espe‐
          cially  in  your  scripts.

The findmnt command gives a bit more flexibility as well - for example you can find either by source or target directly (without needing to grep), and output just the filesystem-specific options. Compare:

$ mount -t nfs | grep public
192.168.1.127:/c/public on /mnt/nfs/public type nfs (rw,relatime,vers=3,rsize=131072,wsize=131072,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=192.168.1.127,mountvers=3,mountport=3097,mountproto=udp,local_lock=none,addr=192.168.1.127)

to

$ findmnt -nM /mnt/nfs/public  -oFS-OPTIONS
rw,vers=3,rsize=131072,wsize=131072,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=192.168.1.127,mountvers=3,mountport=3097,mountproto=udp,local_lock=none,addr=192.168.1.127

I don't think it (yet) provides a way to get values of specific options directly, so a grep or awk would still be necessary for that.

$ findmnt -nM /mnt/nfs/public  -oFS-OPTIONS | grep -qE '\bsoft\b' && echo "soft" || echo "hard"
hard

In your case, it would be

findmnt -nM /home/share3 -oFS-OPTIONS | grep -qE '\bsoft\b' && echo "soft" || echo "hard"


How can I make gnome-shell treat both monitors in the same way?

14.04
In later versions of Gnome, you have to open gnome-tweak-tool and, under "Workspaces", change the "Workspaces only on primary display" setting.


can't install teamviewer in ubuntu13.04 amd64 i386

You installed a 32 bit ubuntu 13.04 os.But the downloaded teamviewer package is for 64bit ubuntu os.so please download 32 bit(i386)version of teamviewer package and install it.


How does nautilus decide what is a local file and what is not?

Local files are the files actually on your discs.

Nautilus can also show files from filesystems available through the GVFS system. This includes (but is probably not limited to):

FTP sites
(Windows) Samba shares
OBEX protocol (Cellphones)
HTTP servers
WebDAV servers
SFTP servers

Those are all not local files since the files them self reside on someone else's system.

Changing if preview should be shown for specific files is done on an extension or mine type based method through the command gsettings.

  disable all thumbnails

gsettings set org.gnome.desktop.thumbnailers disable-all true

  Disable PDFs

gsettings set org.gnome.desktop.thumbnailers disable "['application/pdf']"

(in early versions of Ubuntu when gsettings was introduced Nautilus did not abide these though). The manual method of turning thumbnails off would then be rm -r ~/.thumbnails && ln -s /dev/null .thumbnails

Just in case you are interested (but side stepping the answer): there is someone that made Gloobus Preview and it seems to have a bit more options.

  Gloobus preview is an quick file previewer which supports many formats and preview them instantly. Currently it works better with nautilus and also with marlin file browser but many people don't use other file manager except nautilus.

It uses (/can use) gnome-sushi for thumbnails and this seems to generate them quicker than the how Nautilus does. Gnome-sushi seems to be installable seperate too (see the link).

(I did not test either of these programs though)


Remember to update your Ask Ubuntu's account profile and provide a name and a picture so others can know who they are talking to. This data are shown below a question, answer or comment made by you in order to identify your self.

Problems concerning Broadcom wireless cards not being recognized, panicing the kernel and other compatibility issues, happends on a regular basis. The source may be the Broadcom's package/driver called 'bcmwl-kernel-source', which is automaticaly installed by Ubuntu. Check out what I've written at the link below, and also at the links pointed by it, to see if the case described is the same you're experiencing.

https://askubuntu.com/a/428712/254056

At the end, don't forget to give us a feedback and help the community!

Cheers!


Cant get the wifi to work on Macbook air early 2015 (Ubuntu 15.10)

Finally i got the solution to my problem.

To get the wifi driver working on Macbook air (early 2015)

1st step
sudo apt-get update
sudo apt-get install dkms linux-headers-$(uname -r)

2nd Step
Download the latest driver from below link.
http://ftp.wa.co.za/pub/ubuntu/ubuntu/pool/restricted/b/bcmwl/

Note : Choose the latest one. and If you are using the 32bit version download the 32bit version of driver. and for 64bit download that one. For me i was trying to get the wifi working in kali linux, so for me i could not get the kali linux 64 to boot into my macbook air so i choosed 32bit, as it dosent matter for me eitherway because i got the base model which has only 4GB of ram.

3rd Step
sudo dpkg -i (the driver name)

note: for me "bcmwl-kernel-source_6.30.223.248+bdcom-0ubuntu0.0.3_i386.deb" this was the latest driver and it worked.
so for me it is
sudo dpkg -i bcmwl-kernel-source_6.30.223.248+bdcom-0ubuntu0.0.3_i386.deb

and tadaa it works.. (well for me it worked)

you could try with sudo service network-manager restart
and try again.

***This tutorial should work for all ubuntu and debian based Distros.***


How to (safely) remove Ubuntu from Windows 7?

You didn't have to install Ubuntu to boot into your computer.  You need to install a Boot Manager to boot into your computer.

When you installed Ubuntu, you installed Grub.  Grub is a boot manager that allows you to boot Windows or Linux.

You used a Linux installer.  You can use a Windows installer to install the Windows boot manager instead of using a Linux installer.

Once you install the Windows boot manager, you can again, delete the Ubuntu partition(s).  You won't see a trace of Linux at that point.


Ubuntu installation after windows - /root, /home, /swap

The small ntfs partition is a Windows system partition. If you don't want one to be made, you will need to reformat the drive using something other than Windows, such as the partition utility for Ubuntu.

Start the Ubuntu installer and partition the drive. You do not need to get all the partitions fully correct, just the Windows (NTFS). Make sure that you fully partition the drive (you should not leave any free space on the drive). The partition that Grub will be in has to be a primary partition. Windows will most likely want a primary partition as well when it is installing.
Apply the partitions to the drive.
Cancel the Ubuntu installer
Install Windows into the NTFS partition, do not change partitions using the Windows installer. Since there is no empty space of the disk, Windows will put everything into the same partition.
Install Ubuntu.


How can I count lines of differently named files, and write the outcome to a csv file?

Assuming you want output like 42, 19, 10207, 3 on each line (no filenames), wcand some Bashing will solve your problem.

outfile="Result.csv"
for samplenum in $( seq 1 100 ) ; do
    line=""
    for file in sample${samplenum}.* ; do
        numlines=$( wc -l <$file )
        line="$line $numlines,"
    done
    # remove the final comma
    line=${line%,}
    # not quoting $line below will suppress the initial blank
    echo $line >> $outfile
done

Read man bash, man wc, man seq and man bash again

Responding to comment:

Did you read the man pages?

$( seq 1 100) is replaced with the results of the seq 1 100 command, which simply outputs the integers from 1 to 100 (which reading man seq would have told you). Replace it with something that supplies the numbers of the samples you have.

Put the code in a file (e.g. test.sh) and run it with bash -x test.sh to see details. Replace the seq 1 100 with seq 1 2 for the test, to avoid an avalanche of output.

samplenum holds the number of the sample, which, for this example, runs from 1 to 100.

sample, in sample${samplenum}.* is just a string. It is concatenated with the value of samplenum and the string .* to produce the filename pattern, e.g. sample1.* the first time through the for samplenum ... loop, sample2.* the second time, etc.

Did you read, and understand, man bash, man wc, man seq and man bash again?


There is no cPickle in python 3:

  A common pattern in Python 2.x is to have one version of a module implemented in pure Python, with an optional accelerated version implemented as a C extension; for example, pickle and cPickle. This places the burden of importing the accelerated version and falling back on the pure Python version on each user of these modules. In Python 3.0, the accelerated versions are considered implementation details of the pure Python versions. Users should always import the standard version, which attempts to import the accelerated version and falls back to the pure Python version. The pickle / cPickle pair received this treatment.

-Source.


Unable to connect my Android Phone to my laptop using as a hotspot

It seems you want to use the internet connection of your computer on android phone. Hotspot button actually does not create a hotspot in ubuntu instead creates an ad-hoc.
 First of all as we all know stock rom of android i.e. the one which comes with the phone does not support ad-hoc mode (surprisingly), and even ice-cream sandwich (android 4.0) won't support ad-hoc mode. So, we need to create an access point (hotspot) using Ubuntu to which any android phone can easily connect. In windows you can use connectify to do that and it works perfectly well but with Ubuntu you may have certain problems, depending on whether your wifi-card supports access point mode (master mode) or not. Now, even if your wifi-card supports access point mode, the next problem is whether the driver of your wifi-card supports AP mode or not, if it does then the problem is solved and if does not then you have three options:

1- Wait till the driver recieves an update for AP mode. (many wifi-card drivers are still in staging stage)

2- Buy a wifi-dongle and make sure it supports AP mode on ubuntu.

3- Use windows, where connectify will do the job for you.

If you are interested you can post the name of your wifi-card driver so that i can help you further. command: lshw -c network


can "libexcel-writer-xlsx-perl" be added to precise and later?

These two links help? They are links to Excel-Writer-XLSX and the perl module:

http://search.cpan.org/~jmcnamara/Excel-Writer-XLSX/

http://jmcnamara.github.io/excel-writer-xlsx/

There is a post on this question here: Also a caveat against someone installing through a PPA (command line)due to not having all the files compatible together, I think. Honestly hope this helps.


Devices are not working affecting my performance on Ubuntu especially my graphic card , Guys what to do?

Your graphics card isn't particularly powerful. It's got less power than a GT545 which is from 2014. DaVinci Resolve will not work as expected regardless of which OS you run it on. Try and find the Adrenalin software for your system/card and see if you're able to update the drivers. Even then, you're not likely to get much better performance, but give it a try :)


What is the best way of testing Ubuntu on my computer?

If you are starting with Linux and you would like to give it a go then VirtualBox is the best option:

Pros:

No modifications to your system;
No harm done if something goes wrong and you mess up Ubuntu completely;
Ability to create snapshots and restore them on the fly, ie: Create a snapshot before issuing a weird command that you are not sure about, if something goes wrong you can restore the snapshot and continue with your life;
Mappings can be done so that the file from your Windows system are shared with Ubuntu without the worry of mounting file systems, its easy pie;
If you find that you do not like Ubuntu and you want to remove it from your system you can simply remove VirtualBox and delete the virtual machine files and your system will be back to were it was, no harm done.
No partitioning mistakes! The disk Ubuntu is going to install to is just a file inside your Windows system, delete the file, Ubuntu is out and you can start over.

Create as much partitions as you like;
Play with mount points as you desire;
When in doubt go back and re-do it as you like
No harm done to your Windows installation

Cons:

Not as a fast as a live installation, still bearable and great to try and use;
Eye candy supplied from accelerated graphics is not present or is not as fast as it could be, depending on the system. It will still look imba, but not the same.

The 2 points that would make it a bad choice to install it in a virtual computer do not overcome the pro points, just the simplicity of it should be the main reason to use Ubuntu in VirtualBox if you are using it for the first time.

Later, when you are confident that you want to use it and you are ready to do a real installation you will have all the steps covered and you will feel confident on what to do.

Other best options are:

Wubi

Ubuntu is installed in a file in a Windows directory (normally c:\ubuntu\root), GRUB will replace your Windows boot manager and will let you choose between booting Windows or the Ubuntu system inside that file;
Its a good option because you are actually booting to Ubuntu directly
It makes partitioning easy since everything is done to the file keeping Ubuntu, not really modifies your hard disk partitions
Its bad because if GRUB for any reason gets messed up you will need to go trough some work to restore it, not hard, but for a newbie nothing is simple.

Windows partition resize

Resize your Windows partition using the Ubuntu LiveCD or the Ubuntu installer and install Ubuntu in to its rightful place!
It allows your to keep Windows and Ubuntu on the same computer, allows you to fully play with partitioning and choose mounting points directly in your hard disk space
Installs GRUB to manage the dual boot between Ubuntu and Windows;
Its bad because it installs GRUB and for the same reasons as a Wubi install, if GRUB gets broken you need to fix it. Also resizing can be dangerous (normally is not), make a backup before you do it. Careful so you don't accidentally overwrite any Windows data!
Can be a problem if you somehow destroy Ubuntu or mess up your Windows system from Ubuntu and then you can't boot anymore.

Other options

LiveCD booting

Just download and burn the Ubuntu CD from the downloads site, boot from it and use it as a LiveCD. It will be slow because it is using the CD as the system but it wont harm your system or require installation. Once you reboot everything that was not saved in to your Windows disk or a removable media will be lost.

Install to a USB drive

Most systems now a days allow you to boot from a USB drive. You can install Ubuntu to a USB drive and use it as a spare. GRUB will be installed to the USB drive, it will be a real system and act like one.

Good thing about this is that you do not modify your Windows install.

Bad thing is you need to select the USB drive each time your need to boot in to Ubuntu, or you need to modify GRUB to recognize Windows and give you the option to boot to it.

This is a good option if you have a spare USB drive around and your system allows you to boot from USB.

For a newbie it is always better to have it installed in a way that what ever happens your previous system is safe and that no big changes are done. For the moment stick with a VirtualBox install and when you are more confident move on to the next step. Better a slow start that a fast and disastrous one.


How to install Ubuntu on broken computer

The simplest way to wipe the hard disk in your situation is probably to remove it from the machine, connect it to another (you can get a test connector for about $15 that will connect any IDE or SATA drive to a USB port), and use a partition editor there to create a new partition table, followed by building new partitions etc.

If you could get the laptop to boot to the DVD, you should be able to do that from the Live CD without removing the hard disk -- I suspect there's a problem with your burned DVD.  Try a USB key, or a previously known-good CD/DVD with another Linux Live OS on it.


These settings are store inside /etc/gdm/custom.conf

[daemon]
AutomaticLoginEnable=true
AutomaticLogin={username}
TimedLoginEnable=true
TimedLogin=user
TimedLoginDelay=10

You can edit this from commandline by doing gksu gedit /etc/gdm/custom.conf. Change your name where it says {username}. See if that works.


Create a .desktop file (you could use nano instead of vim.tiny or whatever you like):
sudo vim.tiny /usr/share/applications/scrcpy.desktop

Add the following contents.
[Desktop Entry]
Version=1.0
Type=Application
Name=scrcpy
GenericName=scrcpy
Comment=Screen mirroring application
Exec=scrcpy %F
Icon=phone-symbolic
Terminal=false
X-MultipleArgs=false
Categories=Development;GTK;
StartupNotify=true

It should be available just after creation.


It's a bug in isc-dhcp-server/apparmor. See
https://bugs.launchpad.net/ubuntu/+source/isc-dhcp/+bug/1543794
for progress and possible workarounds


How to get rid of Transmission zombie process?

sudo kill -9 {the PID}

That should do it. But use with care - could be leave the system in a messed up state as with that the process has no way to handle dying in any manner that would be graceful.


Lubuntu is a lightweight derivative of Ubuntu that using the LXDE desktop environment. You can install it as a desktop environment on Ubuntu:

sudo apt-get install lubuntu-desktop

See this link for more detail.


How to determine if a package is safe to uninstall?

Both "safe" and "minimal" are very, very relative. It's impossible to answer this question precisely without being you.

If you want the bare bones installation, install Ubuntu Minimal and add  packages you need to that.

If you're just asking what you can remove without taking down the entire system, that's fairly easy to do with any of the beefier apt-frontends like aptitude and synaptic. Select a package for removal and the tool will tell you what else needs to go. If that doesn't work out for you, just revert that change.

You can remove the ubuntu-desktop package without toppling the system and you will likely need to in order to remove certain things.If you get stuck in a text-mode system, reinstalling that is the simplest route to recovery but it will undo all your work.

Again, building up is easier than tearing down... But it does require you to understand the stack you're working with.

For graphing, you can use something like this (requires graphviz and imagemagick to be installed):

apt-cache dotty ubuntu-minimal | dot -Tpng | display

The graphs are huge though. Rendering takes a while.


While I must say that this "requirement" sounds quite weird, nothing is impossible. You can achieve this with a small script, as I'm going to show below.

Preparation

First of all, we need to install some tools. These are xdotool for the typing emulation and window control, and byzanz for the video recording. Install them using:

sudo apt install xdotool byzanz

Next, copy the code at the end of this answer and save it as bash script on your machine, e.g. as ~/bin/typerec. If you store it in a folder on your $PATH, you'll be able to execute it without specifying its path. Don't forget to make it executable afterwards using chmod +x PATH/TO/SCRIPT.

Usage

Now to record the typing of a specific file, first open your target editor, into which we shall type. Make sure that it has any kind of "auto indentation" feature turned off, otherwise the indentation of the typed code will be messed!

Then launch my script e.g. from a terminal. The correct syntax is

typerec INPUT_FILE OUTPUT_FILE [DELAY]

where INPUT_FILE is the path to your code text file and OUTPUT_FILE is the output file path where the recording shall be stored. It must have an extension accepted by byzanz, i.e. one of gif, webm, ogg, ogv, flv, byzanz (my recommendations in bold). The DELAY argument is optional and sets the delay between two keystrokes in milliseconds. Default is 20 if omitted, I recommend not going below 5.

Example:

typerec /path/to/my/code.py ~/Videos/code.webm 100

Your mouse cursor will change to some kind of cross-hair (not visible in the screenshot) and you will get a notification bubble asking you to click the target editor window now:

Do as you're told, but be careful! If you did not want to start the recording, hit Ctrl+C immediately, while the terminal is still focused and before clicking anywhere.

  Warning!
  As soon as you click anywhere, the script will focus that window and start emulating all the keystrokes to type your input document a second later. This is not stoppable! Once it started, do not touch your keyboard or click anywhere until it finished!  Otherwise your input will mix with the emulated input and may trigger unintended actions, like opening/focusing other windows or activating keyboard shortcuts. You must wait until it stops on its own!

That's it. Once the script finished (note that after the recording is done, it might still need a few more seconds to render and save the video), you can open the recorded video and check the results.

Here is the script:

#!/bin/bash
THIS="$(basename "$0")"
INPUT_FILE="$1"
OUTPUT_FILE="$2"
DELAY="${3:-20}"

show_usage() {
    echo "  Usage:  $THIS INPUT_FILE OUTPUT_FILE [DELAY]"
    echo "where INPUT_FILE is the text file with the content to be typed"
    echo "and OUTPUT_FILE is where the recorded video shall get saved."
    echo "You can set the DELAY between keystrokes in ms (default 20)."
    echo "Note that OUTPUT_FILE will be overwritten if it exists already."
    echo "It must have one of the extensions {gif|webm|ogg|ogv|flv|byzanz}."
    exit 1
}

if [[ -z "$INPUT_FILE" || ! -r "$INPUT_FILE" ]] ; then
    echo "Missing INPUT_FILE argument or file is not existing or readable!"
    show_usage
fi
if [[ -z "$OUTPUT_FILE" ]] ; then
    echo "Missing OUTPUT_FILE argument!"
    show_usage
fi
if [[ ! "$DELAY" -gt 0 ]] ; then
    echo "Invalid argument for DELAY, must be a number > 0 or omitted."
    show_usage
fi

notify-send -i "media-record" "$THIS" "Please select your target editor window."
eval $(xdotool selectwindow getwindowgeometry --shell)
if [[ -z "$WINDOW" || -z "$X" || -z "$Y" || -z "$WIDTH" || -z "$HEIGHT" ]]; then
    echo "Failed to obtain all required target window information. Aborting."
    exit 2
fi

TYPE_COMMAND="xdotool windowactivate --sync \"$WINDOW\" \
              getactivewindow \
              windowfocus --sync \
              sleep 1 \
              type --clearmodifiers --delay "$DELAY" \
                   --file <( tr \\\\n \\\\r < \"$INPUT_FILE\" )"

byzanz-record -e "bash -c '$TYPE_COMMAND'" \
        -x "$X" -y "$Y" -w "$WIDTH" -h "$HEIGHT" \
        "$OUTPUT_FILE" &&

echo "Recording screencast and saving to $OUTPUT_FILE finished successfully."

Alternative one-liner

If you prefer not to save the script anywhere, a one-liner which you can simply paste into the terminal that basically does the same (but omitting input parameters and validations, recording file.txt as typerec.gif with a delay of 20 ms) is below. You're responsible for editing it to use the correct paths and making sure everything is correct yourself there.

( eval $(xdotool selectwindow getwindowgeometry --shell) ; byzanz-record -e "bash -c 'xdotool windowactivate --sync $WINDOW getactivewindow windowfocus --sync sleep 1 type --clearmodifiers --delay 20 --file <( tr \\\\n \\\\r < file.txt )'" -x $X -y $Y -w $WIDTH -h $HEIGHT typerec.gif )


I believe this is what you're looking for: (run this in the terminal)

/usr/lib/gnome-initial-setup/gnome-initial-setup --existing-user


How to upgrade specific package using unattended-upgrades?

I think you could make a cron job of command apt-get install pkg  where pkg is the package you want to update.

If you want to upgrade all packages in a certain repository, see here.


This is just from my experience, but sometimes my wrist will accidentally touch the pad and cause the mouse to jump. If that's not what you meant, you could try this page to see if the suggestions help. https://help.ubuntu.com/community/SynapticsTouchpad

You can adjust the settings to disable the pad while typing.

  Go to System > Preferences > Mouse > Touchpad and uncheck 'Disable
  touchpad while typing' and 'Enable mouse clicks with touchpad'. (This
  method is not available under Ubuntu 14.04.)

Maybe adjust the sensitivity or see if the page above helps at all. Sorry if that's not much help.

You could also make sure you have the synaptics package, which you should, but just in case. Open a terminal (CTRL+ALT+T or from the menu) and enter:

sudo apt-get install xserver-xorg-input-synaptics


Ubuntu phone (Aquarius 4.5) change of UMTS frequency

It's related to your hardware , you have no chance.


I had the same problem but clearing cache didn't sort it. It turned out to be a known issue. Read through it, I could fix it doing the following:

to find the offending character:

iconv -f utf8 -t ucs-2le /var/lib/dpkg/status  >/dev/null || echo "non-UTF-8 found"

removing the offending non-UTF8 character, you should be able to find the character with vim or nano from the line number reported above.

Hope that helps.


The main error in your script is that the [ command, equivalent to test command, is used to test conditions, like string comparison, existence of files, and so on.

To test the exit status of processes you have to use if without [, so your script could be

if mkdir "$appdir" && cd "$appdir"; then
  echo "Success"
else
  echo "Failed to create and switch directory"
fi

This is explained in Bash Pitfalls: 9. if [grep foo myfile.

I suggest you go through GrayCat Bash Guide to understand bash.


Virtual installation: where to find the ISO

First set up the virtual machine (VM), and download a suitable ISO file from the Ubuntu download page. Personally, I would recommend sticking with a LTS release, in this case Ubuntu 12.04. Mount the ISO file as the VM's optical disk and install from there.

Boot the new VM, login, open a terminal and type:

sudo apt-get install build-essential

That will set up the basic things you need in order to compile and build packages on Ubuntu.

Next, install Eclipse from a downloaded archive or (even easier) from the package.

You asked about Eclipse, but you might also want to give the Netbeans IDE a try, which also offers a similar cross-platform IDE experience.


Tested and used in Ubuntu 13.04

As no answer has been marked as correct yet; this could be this issue with running xscreensaver on startup

as @peterx14 says here, many of the tutorials for setting up xscreensaver provide incorrect information.

They tell you to set up a screensaver.desktop file with the following command:

sudo gedit /etc/xdg/autostart/screensaver.desktop

and then place inside it the following information:

[Desktop Entry]
Name=Screensaver
Type=Applicaton
Exec=xscreensaver -nosplash

However, for some reason, in many of these tutorials, the above command is incorrect. 'Application' has been misspelt as 'Applicaton'. This causes the startup command to not work.

Therefore, if you have already entered the command

"xscreensaver -no-splash"

into your startup list, it would not work as xscreensaver is not set up with the type application.

To find out if this is the issue: first run locate screensaver.desktop. This should, somewhere in the list, tell you where screensaver.desktop is. On my computer it's in /etc/xdg/autostart/screensaver.desktop, then open it in an editor (terminal 'nano' may be best as you will need sudo commands to open it) and change 'Applicaton' to 'Application'.

Also, different tutorials (such as liberiangeek and Radu's response)  suggest using:

"xscreensaver -nosplash"

as the fix above uses. This depends which value you have within your screensaver.desktop file on line 4: Exec=xscreensaver -nosplash.


How can i make the PC make a 'beep' sound when network cable is unplugged?

You're not going to want to keep wgetting infinitly to know if you have network:
what you are looking for is a "post-up" script. This is kinda advanced, but you should be able to do this.

First, figure out how to make a sound. You can use the methods @iUngi uses, like echo -e or beep.

To actually add this beeping to the point where you have network, use the information at https://wiki.ubuntu.com/OnNetworkConnectionRunScript

The part you are interested in (but read the whole thing!) is this:

  Edit the text configuration file /etc/network/interfaces and add one
  of the following directive pre-up , post-up , pre-down , post-down to
  the appropriate network connection, for example :

  auto eth0
  iface eth0 inet dhcp
  name WiFi
  post-up
  /etc/network/if-up.d/myscript.sh

  restart your network:

  /etc/init.d/networking restart

You can obviously add an extra check ping for instance or just get the headers (curl --head) if your connection isn't always on internet but can be a local connection (and you don't want a beep then), but I think that shouldn't be needed in all cases.


"Assignment outside section in config file." error when trying to run/autostart redshift

I saved it in mousepad instead, and set speech to =0 as I have 1 monitor. I have a graphical plasmoid for redshift set up which had different values to the config file (and could apply them), but i've changed them to be the same now.

I restarted the computer, and redshift is now on the taskbar and works.


For Firefox do this:

Type "about:config" on the address bar.
Search for layers.acceleration.force-enabled (default is false). This forces Hardware Acceleration to turn on.
Change it to true by double-clicking.
Save and restart Firefox.


In CCSM, go into the options for Ubuntu Unity Plugin and in the tab Experimental, change option Dash Blur from "Active Blur" to "Static Blur" or "No Blur".

You can also go into option Composite and disable "Detect Refresh Rate" and increase option Refresh Rate to over 60.

Remember these options will only apply with Unity 3D


Chroot into a 32-bit version of Ubuntu from a 64-bit host

you may try

linux32 ./setup

this helps for 32Bit teamspeak on 64bit servers.

from man: (linux32 is an setarch alias)

   setarch  -  change reported architecture in new program environment and
   set personality flags


You are so close! Depending on how you want to do it.

Approach 1

If you want it to be in command line, then it's done via .bash_aliases and our Ubuntu .bashrc is already configured for that.  You will find .bash_aliases in your home directory ( ~/ or $HOME )

In your .bash_aliases file, enter each line for each alias you want to set up.  I.e.

    alias myweb="cd /var/www"
    alias privfold="cd $HOME/secretfolder"

That's for command line if you want to jump straight to a folder.

Approach 2

As for filesystem as itself.  Enter this:

  cd /home/myhome
  ln -s /var/www mywww

This will create a folder in your home directory at which this folder points to your /var/www (typical location for webserver).   'ln' is a symlink that ties between these two folders.


you need to add yourself to the www-pub group

plus /opt/lamp is not the same as /var/www

sudo groupadd www-pub #I am not sure if you need this
sudo usermod -a -G www-pub kyle
sudo chown -R root:www-pub /var/www
sudo chown -R root:www-pub /opt/lamp
sudo find /var/www -type d -exec chmod 2775 {} +
sudo find /var/www -type f -exec chmod 0664 {} +
sudo find /opt/lamp -type d -exec chmod 2775 {} +
sudo find /opt/lamp -type f -exec chmod 0664 {} +

BUT you probably need EITHER /opt/lamp or /var/www , not both

Then log out and back in.

See also How to avoid using sudo when working in /var/www?


How do I rebuild Octave and link in GraphicsMagick?

(I had the same problem)
This worked for me at the end.

In terminal, install

sudo apt-get build-dep octave

In synaptic, install

libqt4-opengl-dev

Then,
download octave-4.0.0.tar.gz from ftp://ftp.gnu.org/gnu/octave/

unzip octave-4.0.0.tar.gz to home.

cd octave-4.0.0
./configure
make
sudo make install

This worked on all the machines I tried in my laboratory.


Are there any free/open source alternatives to Adobe After Effects?

Try Blender.  It's a free, open source content creation suite that has an impressive number of features:

Two built-in rendering engines, Blender Internal (fast) and Cycles (realistic), along with other experimental engines such as Freestyle
A game engine
The Bullet physics engine, which can be integrated with the above
A text editor
An image editor
A non-linear editor that works with both audio and video
Tight integration with the open-source, highly popular Python programming language:

Python syntax highlighting in the text editor
An interactive Python prompt
A Python-scriptable interface accelerated with OpenGL
Extension with Python plugins
Python integration in the game engine

Motion tracking
Collada import/export
Compositing
A node editor for Blender highly flexible Cycles rendering engine
CUDA/OpenCL-based GPU rendering for Nvidia cards
Fluid, cloth, smoke, and fire physics simulations

And much, much more.  Not to mention a rapid release cycle (~2 months), a large amount of high-quality documentation (both free and paid; see Blender Cookie), a large, vibrant community, a Blender SE proposal on Area51 currently in the commit stage and four successful Creative-Commons-licensed movie projects.

How does this apply to you?  Using the aforementioned motion tracking feature allows you to utilize Blender's power to generate some pretty good special effects (not quite on par with After Effects - it is primarily a 3D modeling application, after all).  As Blender's motion tracking algorithms get improved and the visual effects get more realistic, using Blender as a replacement for After Effects should become an easier and easier switch to make.


How do I enable the 3D Cube so I can use it in Unity?

There are currently two issues:

Every time you enable or disable a plugin in CompizConfig Settings Manager (ccsm), Compiz (and therefore Unity) will crash.
CompizConfig Settings Manager fails to replace the Wall plugin with the Desktop Cube plugin.

One really ugly workaround is to manually set the plugins via the commandline:

gconftool-2 --type l --list-type string --set /apps/compiz-1/general/screen0/options/active_plugins "[core,bailer,detection,composite,opengl,compiztoolbox,decor,move,vpswitch,place,mousepoll,resize,staticswitcher,imgpng,regex,gnomecompat,grid,snap,zoom,session,animation,workarounds,fade,cube,expo,scale,rotate,unityshell,unitymtgrabhandles]" && (unity &)

Running this will set the plugins to Unity's default, but will replace Wall with Desktop Cube and Rotate Cube.

Unity's default is to have 2x2 desktops, but for the cube you'll likely want 4x1 desktops. You can change this in the General Options plugin in the CompizConfig Settings Manager. Go to the Desktop Size tab, and change Horizontal Virtual Size to 4 and Vertical Virtual Size to 1.

You should now be able to rotate the cube using the default shortcuts:

Alt + Ctrl + ←  and Alt + Ctrl + →


Just installed Ubuntu onto blank hard drive from disk but now won't boot

Try re installing it again, sounds like grub got messed up... you did install grub right?

Okay this is for an older version but it is all I could find but it should give you the gist of it.

https://seogadget.co.uk/the-ubuntu-installation-guide/#Install-from-USB

Let me know if you have any more specific questions.


Can I upgrade from Ubuntu 12.04.5 to Kubuntu 14.04.5?

You can upgrade from Ubuntu 12.04 to Ubuntu 14.04 and then install Kubuntu Plasma Desktop (kubuntu-desktop) in order to end up with a clumsy Kubuntu Plasma Desktop environment running on an Ubuntu 14.04 base. The nice way to do it is to do a fresh of install Kubuntu 16.04 which is Long Term Support release or Kubuntu 17.04 which is a regular release. In all of these cases you can use apt from the terminal to install .deb packages and get support from Ask Ubuntu the same as in Ubuntu.


How do I set the background color/pattern in a Nautilus window?

My problem with this new ubuntu 11.10 was the fact that i was not able to change the background color of the windows, that white color just drove me crazy; as you noticed 'appearance preferences' from the old ubuntu does not exit any more here; there is a way though (or maybe more):

Here's what you have to do to change colors in ubuntu 11.10:

Open the terminal, paste

sudo apt-get install dconf-tools

then

dconf-editor

Browse to org.gnome.desktop.interface.

Locate gtk-color-scheme, don't click on it, click on the empty space on the right side to get a small box where you will paste the following:

bg_color:#ebe0be;selected_bg_color:#737370;base_color:#9d906a

Press enter, nothing else! The colors will change right away (this is just an example with my favourite colors).

If you wanna find your own colors, install gnome color chooser and play with the colors (the color palette will look the same as it did in 'appearance preferences in the old ubuntu) to find out the right codes (six digit hexadecimal numbers) for the ones that you like.

Once you find yours, paste the six digit code number into the right place in gtk-color-scheme and then enter again it is done.


Because you need mount folder first (in /home/user_name/google-drive):

# mount
google-drive-ocamlfuse ~/google-drive

An them umount:

# umount
fusermount -u ~/google-drive

PD: I recommend changing the name of the folder without symbols. Maybe "gdrive" or another similar

/home/user_name/gdrive

And it's even better to use a bash script described in the post Share Google Drive in Samba

#!/bin/sh
# replace "user" with yout username unix account
MYUSER="user"
# replace "gdrive" with your (path) GoogleDrive Folder
GD="/home/$MYUSER/gdrive"

case "$1" in
  start)
    echo 'Mount Google Drive...'
    # Optional (If the folder does not exist)
    if [ ! -d $GD ]; then mkdir -p $GD && chmod 777 $GD; fi
    google-drive-ocamlfuse $GD
    echo "OK"
    exit
  ;;
  stop)
    echo 'Umount Google Drive...'
    fusermount -u $GD
    echo "OK"
    exit
  ;;
  *)
  echo "Usage: ./gdmu {start|stop}"
 exit 1
 ;;
 esac
 exit 0

Save as bash gdriveini (or any name you want) and execute (don't forget chmod +x gdriveini):

 ./gdriveini start
 ./gdriveini stop