Import files to seafile from cli

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 8756C4F765C9AC3CB6B85D62379CE192D401AB61
echo deb http://dl.bintray.com/seafile-org/deb jessie main | sudo tee /etc/apt/sources.list.d/seafile.list
sudo apt-get update
apt-get install seafile-cli

Now setup cli:
# choose a folder where to store the seafile client settings e.g ~/seafile-client

mkdir ~/seafile-client            # create the settings folder
seaf-cli init -d ~/seafile-client  # initialise seafile client with this folder
seaf-cli start
seaf-cli is command line interface for seafile client.
Subcommands:
    init:           create config files for seafile client
    start:          start and run seafile client as daemon
    stop:           stop seafile client
    list:           list local liraries
    status:         show syncing status
    download:       download a library from seafile server
    sync:           synchronize an existing folder with a library in
                        seafile server
    desync:         desynchronize a library with seafile server
    create:         create a new library
Detail
======
Seafile client stores all its configure information in a config dir. The default location is `~/.ccnet`. All the commands below accept an option `-c <config-dir>`.
init
----
Initialize seafile client. This command initializes the config dir. It also creates sub-directories `seafile-data` and `seafile` under `parent-dir`. `seafile-data` is used to store internal data, while `seafile` is used as the default location put downloaded libraries.
    seaf-cli init [-c <config-dir>] -d <parent-dir>
start
-----
Start seafile client. This command start `ccnet` and `seaf-daemon`, `ccnet` is the network part of seafile client, `seaf-daemon` manages the files.
    seaf-cli start [-c <config-dir>]
stop
----
Stop seafile client.
    seaf-cli stop [-c <config-dir>]
Download
--------
Download a library from seafile server
    seaf-cli download -l <library-id> -s <seahub-server-url> -d <parent-directory> -u <username> -p <password>
sync
----
Synchronize a library with an existing folder.
    seaf-cli sync -l <library-id> -s <seahub-server-url> -d <existing-folder> -u <username> -p <password>

First retrieve the library id by browsing on the server -> it's in the url after "/repo/"

usage: seaf-cli sync [-h] [-c CONFDIR] [-l LIBRARY] [-s SERVER] [-u USERNAME]
                     [-p PASSWORD] [-d FOLDER]

optional arguments:
  -h, --help            show this help message and exit
  -c CONFDIR, --confdir CONFDIR
                        the config directory
  -l LIBRARY, --library LIBRARY
                        library id
  -s SERVER, --server SERVER
                        URL for seafile server
  -u USERNAME, --username USERNAME
                        username
  -p PASSWORD, --password PASSWORD
                        password
  -d FOLDER, --folder FOLDER
                        the existing local folder


desync
------
Desynchronize a library from seafile server
    seaf-cli desync -d <existing-folder>
create
------
Create a new library
    seaf-cli create -s <seahub-server-url> -n <library-name> -u <username> -p <password> -t <description> [-e <library-password>]
'''

Get library id:

seaf-cli list-remote -s  "https://cloud.joel.co.in" -u "[email protected]" -p "mypassword"
Name    ID
My Library d9d122233-43b6-4af3-21dde-59aawwwww45df11

Now download to local folder:

seaf-cli download -l "d9d122233-43b6-4af3-21dde-59aawwwww45df1" -s  "https://cloud.joel.co.in" -d /tmp/lib -u "[email protected]" -p "mypassword"
Starting to download ...
Library d9d122233-43b6-4af3-21dde-59aawwwww45df1 will be downloaded to /tmp/lib

Now add to this directory:

cp /tmp/att/* /tmp/lib/My\ Library/Shanghumukham-April\ 2017/Arun/

You dont need to upload/sync after adding files. The daemon automatically does that. In fact, if you attempt to sync you get an error:

seaf-cli sync -l "d9d122233-43b6-4af3-21dde-59aawwwww45df1" -s  "https://cloud.joel.co.in" -d /tmp/lib -u "[email protected]" -p "mypassword"
Starting to download ...
Traceback (most recent call last):
  File "/usr/bin/seaf-cli", line 832, in <module>
    main()
  File "/usr/bin/seaf-cli", line 828, in main
    args.func(args)
  File "/usr/bin/seaf-cli", line 568, in seaf_sync
    email, random_key, enc_version, more_info)
  File "/usr/lib/python2.7/dist-packages/pysearpc/client.py", line 112, in newfunc
    return fret(ret_str)
  File "/usr/lib/python2.7/dist-packages/pysearpc/client.py", line 25, in _fret_string
    raise SearpcError(dicts['err_msg'])
pysearpc.common.SearpcError: Repo already exists

It may be a good option to desync at the end lest you end up deleting needed folders/files.

Stopping sync:

seaf-cli desync -d /tmp/lib/My\ Library

Syncing to existing local library after desyncing:

seaf-cli sync -l "d9d122233-43b6-4af3-21dde-59aawwwww45df1" -d /root/SeafileLocalSync -s  "https://cloud.joel.co.in" -u "[email protected]"

More information from the Wiki:

Seafile client for a Cli server
Installation
You can follow this documentaion to install Seafile CLI client on various Linux distributions.

Basic Usage
Initialise & start the client

# choose a folder where to store the seafile client settings e.g ~/seafile-client
mkdir ~/seafile-client            # create the settings folder
seaf-cli init -d ~/seafile-client  # initialise seafile client with this folder
seaf-cli start
Download a library from a server

retrieve the library id by browsing on the server -> it's in the url after /repo/
then
seaf-cli download -l "the id of the library" -s  "the url + port of server" -d "the folder where the library folder will be downloaded" -u "username on server" [-p "password"]
seaf-cli status  # check status of ongoing downloads
# Name  Status  Progress
# Apps    downloading     9984/10367, 9216.1KB/s
Note: if you not supply the password parameter in the command, it will be asked later, which is more safe.

Example: `seaf-cli download -l 0536c006-8a43-449e-8718-39f12111620d -s http://cloud.seafile.com -d /tmp -u [email protected]`
Download a library from a server and sync with an existing folder.

# This is the same as download : replace download by sync 
seaf-cli sync -l "the id of the library" -s  "the url + port of server" -d "the folder where the library will be synced with" -u "username on server" -p "password"
Man documentation
seaf-cli is command line interface for seafile client.

Subcommands:

init                Initialize config directory
start               Start ccnet and seafile daemon
stop                Stop ccnet and seafile daemon
list                List local libraries
list-remote         List remote libraries
status              Show syncing status
download            Download a library from seafile server
download-by-name    Download a library defined by name from seafile server
sync                Sync a library with an existing foler
desync              Desync a library with seafile server
create              Create a library
config              Configure seafile client
Running seaf-cli -h will show the above help. For each subcommand, you can also use -h option to get help, e.g. seaf-cli download -h.

Detail
Seafile client stores all its configure information in a config dir. The default location is ~/.ccnet. All the commands below accept an option -c <config-dir>.

init
Initialize seafile client. This command initializes the config dir. It also creates sub-directories seafile-data and seafile under parent-dir. seafile-data is used to store internal data, while seafile is used as the default location put downloaded libraries.

seaf-cli init [-c <config-dir>] -d <parent-dir>
A file named seafile.ini will be created under ~/.ccnet to record the location of seafile-data directory.

If you want to run multiple instances of Seafile cli client in the same machine, you can specify different config-dir and parent-dir when initializing different client instances. Then the instances can run without interfering each others. When starting the instances, just specify ccnet config directories with the -c option.

start
Start seafile client. This command start ccnet and seaf-daemon, ccnet is the network part of seafile client, seaf-daemon manages the files.

seaf-cli start [-c <config-dir>]
stop
Stop seafile client.

seaf-cli stop [-c <config-dir>]
Download
Download a library from seafile server

seaf-cli download -l <library-id> -s <seahub-server-url> -d <parent-directory> -u <username> [-p <password>]
sync
Synchronize a library with an existing folder.

seaf-cli sync -l <library-id> -s <seahub-server-url> -d <existing-folder> -u <username> [-p <password>]
desync
Desynchronize a library from seafile server

seaf-cli desync -d <existing-folder>
create
Create a new library on server

seaf-cli create [-h] -n library-name -t description [-e library-password] -s server -u username -p password
Skip SSL certificate verify
If you're using self-signed certificate on the server, you should ask the client to skip verifying certificate.

seaf-cli config -k disable_verify_certificate -v true
Set Transfer Speed Limit
Set upload speed limit to 1MB/s :

seaf-cli config -k upload_limit -v 1000000
Set download speed limit to 1MB/s :

seaf-cli config -k download_limit -v 1000000

To sync your Dropbox folder to a new library in Seafile, create a library in Seafile named Dropbox. Then install Dropbox headless on the server and start the daemon:

64-bit:

cd ~ && wget -O - "https://www.dropbox.com/download?plat=lnx.x86_64" | tar xzf -

Next, run the Dropbox daemon from the newly created .dropbox-dist folder. You will need to authorize after starting the daemon:

~/.dropbox-dist/dropboxd
Dowload the Dropbox helper python script if you want fine grained control:
wget https://www.dropbox.com/download?dl=packages/dropbox.py
mv download\?dl\=packages%2Fdropbox.py dropbox.py
chmod +x dropbox.py
./dropbox.py

Now create a library in Seafile, note its library id (the sequence after /lib/)
Make seafile sync to existing Drobox directory

seaf-cli sync -l [libid] -s "https://cloud.yoursom.com" -u [Username] -d ~/Dropbox

To sync Google Drive:
First install the cli:
apt-get install git cmake build-essential libgcrypt11-dev libyajl-dev \
libboost-all-dev libcurl4-openssl-dev libexpat1-dev libcppunit-dev binutils-dev
git clone https://github.com/Grive/grive.git
cd grive
dpkg-buildpackage -j4 -uc -us
dpkg -i ../grive*deb
mkdir ~/GoogleDrive
cd ~/GoogleDrive
grive -a
seaf-cli sync -l [libid] -s “https://cloud.yoursom.com” -u [Username] -d ~/GoogleDrive
grive &
[/bash]

grive doesnt run as a daemon, so create a cron job to sync files every 5 minutes:

*/5 * * * * cd /root/GoogleDrive && /usr/bin/grive

You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.

How to compile latest mplayer on Ubuntu?

echo Installing some essential packages.. && \
sudo apt-get -y install build-essential subversion checkinstall git-core \
docbook-xml docbook-xsl xsltproc libxml2-utils && \
mkdir -pv $HOME/mplayer_build && \
cd $HOME/mplayer_build && \
wget http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz && \
tar xvf yasm-1.3.0.tar.gz && cd yasm-1.3.0 && \
./configure && make -j 2 && \
mkdir -vp doc-pak && \
cp -v Artistic.txt AUTHORS COPYING doc-pak && \
sudo checkinstall --pakdir "$HOME/mplayer_build" --backup=no --deldoc=yes \
                  --pkgname yasm --pkgversion "1.2.0" --fstrans=no \
                  --deldesc=yes --delspec=yes --default && \
make distclean && \
echo Installing some dev packages.. && \
echo sudo apt-get -y install libaa1-dev libasound2-dev libcaca-dev libcdparanoia-dev libdca-dev libdirectfb-dev libenca-dev libesd0-dev libfontconfig1-dev libfreetype6-dev libfribidi-dev libgif-dev libgl1-mesa-dev libjack-jackd2-dev libopenal1 libpulse-dev libsdl1.2-dev libvdpau-dev libxinerama-dev libxv-dev libxvmc-dev libxxf86dga-dev libxxf86vm-dev librtmp-dev libsctp-dev libass-dev libfaac-dev libsmbclient-dev libtheora-dev libogg-dev libxvidcore-dev libspeex-dev libvpx-dev libschroedinger-dev libdv4-dev libopencore-amrnb-dev libopencore-amrwb-dev libmp3lame-dev liblivemedia-dev libtwolame-dev libmad0-dev libgsm1-dev libbs2b-dev liblzo2-dev ladspa-sdk libopenjpeg-dev libfaad-dev libmpg123-dev libopus-dev libbluray-dev libaacs-dev && \
echo && \
sudo apt-get -y install libaa1-dev libasound2-dev libcaca-dev libcdparanoia-dev libdca-dev libdirectfb-dev libenca-dev libesd0-dev libfontconfig1-dev libfreetype6-dev libfribidi-dev libgif-dev libgl1-mesa-dev libjack-jackd2-dev libopenal1 libpulse-dev libsdl1.2-dev libvdpau-dev libxinerama-dev libxv-dev libxvmc-dev libxxf86dga-dev libxxf86vm-dev librtmp-dev libsctp-dev libass-dev libfaac-dev libsmbclient-dev libtheora-dev libogg-dev libxvidcore-dev libspeex-dev libvpx-dev libschroedinger-dev libdv4-dev libopencore-amrnb-dev libopencore-amrwb-dev libmp3lame-dev liblivemedia-dev libtwolame-dev libmad0-dev libgsm1-dev libbs2b-dev liblzo2-dev ladspa-sdk libopenjpeg-dev libfaad-dev libmpg123-dev libopus-dev libbluray-dev libaacs-dev && \
cd $HOME/mplayer_build && \
sudo mkdir -pv /usr/local/lib/codecs && \
if [ "$(uname -m)" = "x86_64" ]; then
 wget http://www.mplayerhq.hu/MPlayer/releases/codecs/essential-amd64-20071007.tar.bz2
 tar xjvf essential-amd64-20071007.tar.bz2
 sudo cp -v essential-amd64-20071007/* /usr/local/lib/codecs
else
 wget http://www.mplayerhq.hu/MPlayer/releases/codecs/all-20110131.tar.bz2
 tar xjvf all-20110131.tar.bz2
 sudo cp -v all-20110131/* /usr/local/lib/codecs
fi
if [ "$(uname -m)" = "x86_64" ]; then
  ARCHOPTS="--enable-pic"
 else
  ARCHOPTS=""
fi && \
cd $HOME/mplayer_build && \
git clone git://git.videolan.org/x264.git --depth 1 && \
cd x264 && \
./configure --prefix=$HOME/mplayer_build/mplayer_deps/usr \
            --enable-static --disable-cli $ARCHOPTS && \
make && make install && \
echo Compiling mplayer...
cd $HOME/mplayer_build && \
svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer && \
cd mplayer && \
PKG_CONFIG_PATH="$HOME/mplayer_build/mplayer_deps/usr/lib/pkgconfig" \
./configure \
           --extra-cflags="-I$HOME/mplayer_build/mplayer_deps/usr/include" \
           --extra-ldflags="-L$HOME/mplayer_build/mplayer_deps/usr/lib" \
           --confdir=/etc/mplayer \
           --codecsdir=/usr/local/lib/codecs && \
make -j 2 && make html-chunked && \
mkdir -vp doc-pak && \
cp -v DOCS/HTML/*/* AUTHORS Changelog LICENSE README doc-pak && \
sudo checkinstall -D --install=yes --fstrans=no --pakdir "$HOME/mplayer_build" \
   --pkgname mplayer --backup=no --deldoc=yes --deldesc=yes --delspec=yes --default \
   --pkgversion "2:1.0~svn$(LC_ALL=C svn info 2> /dev/null | \
     grep Revision | cut -d' ' -f2)" --provides "mplayer,mencoder" && \
make distclean && sudo ldconfig

You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.

Changing gnome settings in Ubuntu 16.04 from command line

You can get a list of schemas with:

gsettings list-schemas
org.gnome.rhythmbox.library
org.gnome.shell.overrides
org.gnome.system.proxy.https
org.nemo.preferences
org.gnome.settings-daemon.plugins.cursor
org.gnome.evolution.shell
org.gnome.evolution.plugin.face-picture
com.ubuntu.update-manager
org.gnome.shell.extensions.auto-move-windows
org.gnome.eog.fullscreen
org.gnome.login-screen
org.gnome.eog.view
org.gnome.evolution-data-server.calendar
org.gnome.evolution.plugin.itip
org.gnome.evolution.plugin.autocontacts
org.gnome.evolution.plugin.attachment-reminder
com.canonical.a11y-profile-manager
org.gnome.libgnomekbd
org.gnome.rhythmbox.plugins.mtpdevice
org.gnome.desktop.search-providers
org.gnome.evolution.shell.network-config
org.gnome.Logs
org.gnome.rhythmbox.player
org.gnome.calculator
org.gnome.settings-daemon.plugins.a11y-settings
org.gnome.DejaDup.Rackspace
org.gnome.system.smb
org.gnome.desktop.media-handling
org.gnome.software
org.gnome.settings-daemon.plugins.smartcard
org.freedesktop.Telepathy.Logger
org.gnome.desktop.default-applications
org.gnome.nm-applet
org.gnome.settings-daemon.peripherals.keyboard
org.gnome.gnome-system-log
org.gnome.evolution
org.gnome.settings-daemon.plugins
org.gnome.Terminal.ProfilesList
org.gnome.shell.app-switcher
com.canonical.unity-gtk-module
org.freedesktop.Tracker
org.gnome.Contacts
org.gnome.gedit.state
org.gnome.gedit.preferences.ui
org.gnome.rhythmbox.plugins.magnatune
org.gnome.documents
org.gnome.FileRoller.Dialogs.New
org.gnome.gedit.plugins
org.gnome.settings-daemon.plugins.gsdwacom
org.gnome.desktop.a11y.mouse
org.gtk.Settings.Debug
org.gnome.shell.extensions.screenshot-window-sizer
org.gnome.desktop.wm.preferences
org.gnome.seahorse.recipients
org.gnome.gedit.state.history-entry
org.gnome.online-accounts
org.gnome.mutter.keybindings
org.gnome.settings-daemon.plugins.xsettings
org.gnome.FileRoller.Dialogs.LastOutput
org.gnome.Empathy.conversation
org.gnome.nautilus.window-state
org.gnome.gedit.plugins.terminal
org.gnome.yelp
org.gnome.libgnomekbd.keyboard
org.gnome.gnome-screenshot
org.nemo.privacy
org.gnome.DejaDup.GDrive
org.gnome.evolution.plugin.prefer-plain
org.gnome.shell.window-switcher
com.ubuntu.notifications.hub
org.gnome.seahorse
org.gnome.settings-daemon.plugins.media-keys
org.gnome.totem.plugins.opensubtitles
org.gnome.Empathy.sounds
org.gnome.settings-daemon.plugins.color
org.gnome.evolution-data-server
org.gnome.totem
org.gnome.baobab.preferences
org.nemo.icon-view
org.gnome.FileRoller.Dialogs.Add
org.gnome.settings-daemon.plugins.gdu-sd
org.gnome.evolution.plugin.publish-calendar
org.freedesktop.ibus.general.xkblayoutconfig
org.gnome.settings-daemon.plugins.xrandr
org.gnome.baobab.ui
org.gnome.shell.extensions.classic-overrides
org.gnome.desktop.a11y.keyboard
org.gnome.settings-daemon.plugins.orientation
org.gnome.desktop.a11y
org.gnome.system.proxy.socks
org.gnome.desktop.interface
org.freedesktop.Tracker.FTS
org.gnome.system.proxy
org.gnome.mousetweaks
org.gnome.gedit.preferences
org.gnome.desktop.lockdown
org.gnome.settings-daemon.plugins.housekeeping
org.gnome.Empathy.notifications
org.gnome.desktop.a11y.applications
org.gnome.mutter.wayland.keybindings
org.gnome.rhythmbox.sources
org.gnome.settings-daemon.plugins.rfkill
org.gnome.gedit.preferences.print
org.gnome.evolution.spamassassin
org.freedesktop.Tracker.Miner.Files
org.gnome.Maps
org.gnome.settings-daemon.plugins.datetime
org.nemo.sidebar-panels.tree
org.gnome.Evince.Default
org.gnome.rhythmbox
org.gnome.settings-daemon.plugins.clipboard
org.gnome.libgnomekbd.preview
org.gnome.desktop.default-applications.office.calendar
org.gnome.mines
org.gnome.shell
org.gnome.Empathy.hints
org.gnome.Terminal.Legacy.Settings
org.gnome.brasero.config
org.gnome.desktop.screensaver
org.gnome.eog.plugins
org.gnome.system.locale
org.gnome.settings-daemon.plugins.updates
org.gnome.desktop.wm.keybindings
org.gnome.eog
org.gnome.system.proxy.ftp
org.gnome.evolution.addressbook
org.gnome.sudoku
org.gnome.gedit
org.gnome.Disks
org.freedesktop.Tracker.DB
apps.nautilus-pastebin
org.freedesktop.Tracker.Needle
org.gnome.evolution.bogofilter
org.gnome.mutter
org.freedesktop.folks
org.gnome.gedit.preferences.encodings
org.gnome.evolution.importer
org.gnome.FileRoller.Listing
org.freedesktop.Tracker.Writeback
org.gnome.gnome-system-monitor
org.gnome.system.proxy.http
org.gnome.SessionManager
org.gnome.gedit.state.window
org.nemo.desktop
org.nemo.list-view
org.gnome.desktop.background
org.freedesktop.ibus.general
org.gnome.Evince
org.gnome.Empathy.ui
org.gnome.baobab
org.gnome.evolution.calendar
org.gnome.brasero
org.gnome.settings-daemon.peripherals
org.gnome.desktop.peripherals
com.ubuntu.user-interface
ca.desrt.dconf-editor.Settings
com.canonical.indicator.sound
org.gnome.desktop.notifications
org.gnome.gedit.plugins.time
org.gnome.gedit.plugins.filebrowser.nautilus
org.gnome.Empathy.location
org.gnome.Charmap
org.gnome.FileRoller
org.gnome.Weather.Application
org.gnome.Cheese
org.gnome.gedit.plugins.filebrowser
com.ubuntu.sound
org.gnome.desktop.peripherals.mouse
org.gnome.crypto.pgp
org.gnome.FileRoller.General
org.gnome.GWeather
org.gnome.settings-daemon.plugins.screensaver-proxy
org.gnome.desktop.default-applications.office.tasks
org.gnome.Empathy.call
org.gnome.books
org.gnome.desktop.app-folders
org.gnome.gedit.preferences.editor
org.gnome.settings-daemon.peripherals.smartcard
org.gnome.gnome-system-monitor.openfilestree
org.gnome.nautilus.list-view
org.gnome.SimpleScan
org.gnome.nautilus.icon-view
org.nemo.compact-view
org.gnome.rhythmbox.plugins.iradio
org.gnome.desktop.peripherals.touchpad
org.gnome.gnome-system-monitor.memmapstree
org.gnome.DejaDup.File
org.gnome.Music
org.gnome.seahorse.manager
org.gnome.evolution.plugin.external-editor
org.gtk.Settings.FileChooser
com.ubuntu.touch.sound
org.gnome.DejaDup.S3
org.gnome.settings-daemon.plugins.remote-display
org.gnome.shell.keyboard
org.gnome.libgnomekbd.desktop
org.gnome.shell.extensions.user-theme
org.gnome.calendar
org.gnome.gedit.state.file-filter
org.gnome.mahjongg
org.gnome.shell.calendar
org.gnome.settings-daemon.plugins.background
org.freedesktop.Tracker.Miner
org.gnome.settings-daemon.plugins.a11y-keyboard
org.gnome.Charmap.WindowState
org.gnome.telepathy-account-widgets.ui
org.gnome.rhythmbox.plugins.visualizer
org.gnome.settings-daemon.peripherals.input-devices
org.freedesktop.Tracker.Store
org.gtk.Settings.ColorChooser
org.gnome.desktop.privacy
org.gnome.system.dns_sd
org.freedesktop.ColorHelper
org.gnome.rhythmbox.plugins.grilo
org.gnome.desktop.a11y.magnifier
org.gnome.seahorse.nautilus
org.gnome.rhythmbox.plugins.replaygain
org.gnome.rhythmbox.plugins.ipod
org.gnome.rhythmbox.plugins.daap
org.gnome.desktop.default-applications.office
org.gnome.rhythmbox.rhythmdb
org.gnome.desktop.sound
org.gnome.evolution.mail
org.gnome.desktop.datetime
org.gnome.Vino
com.ubuntu.touch.network
org.gnome.rhythmbox.podcast
org.gnome.evolution-data-server.addressbook
org.gnome.evolution.plugin.templates
org.gnome.evolution.plugin.mail-notification
org.gnome.desktop.peripherals.keyboard
org.gnome.settings-daemon.plugins.mouse
org.gnome.settings-daemon.plugins.sharing
org.gnome.crypto.cache
org.gnome.rhythmbox.plugins.audiocd
org.gnome.gedit.plugins.pythonconsole
org.freedesktop.ibus.panel
org.gnome.photos
com.ubuntu.phone
com.ubuntu.touch.system
org.gnome.FileRoller.UI
org.gnome.FileRoller.Dialogs.Extract
org.gnome.FileRoller.Dialogs
org.gnome.desktop.input-sources
org.gnome.Evolution.DefaultSources
org.gnome.desktop.default-applications.terminal
org.gnome.eog.ui
org.gnome.rhythmbox.plugins.android
org.gnome.system.location
org.gnome.rhythmbox.plugins
org.gnome.shell.keybindings
org.nemo.sidebar-panels
org.gnome.libgnomekbd.indicator
org.gnome.FileRoller.FileSelector
org.gnome.settings-daemon.plugins.sound
org.gnome.settings-daemon.plugins.power
apps.gtkhash
apps.gtkhash-properties
org.nemo.window-state
com.canonical.indicator.appmenu
org.gnome.settings-daemon.plugins.keyboard
org.nemo.plugins
org.freedesktop.ibus
org.gnome.rhythmbox.sharing
org.gnome.brasero.display
org.nemo
org.gnome.desktop.session
org.gnome.settings-daemon.peripherals.touchscreen
org.freedesktop.gstreamer-0.10.default-elements
org.gnome.gnome-system-monitor.proctree
com.ubuntu.update-notifier
org.gnome.nautilus
org.gnome.desktop.peripherals.trackball
org.gnome.meld
org.gnome.evolution.eds-shell
org.freedesktop.ibus.general.hotkey
org.gnome.desktop.thumbnail-cache
org.gnome.desktop.thumbnailers
com.canonical.Unity.Lenses
org.gnome.gedit.plugins.externaltools
org.gnome.nautilus.preferences
org.gnome.gnome-system-monitor.disktreenew
im.telepathy.MissionControl.FromEmpathy
org.gnome.brasero.filter
com.canonical.indicator.messages
org.gnome.DejaDup.OpenStack
org.gnome.gedit.plugins.drawspaces
org.freedesktop.Geoclue
org.gnome.desktop.file-sharing
org.gnome.shell.extensions.native-window-placement
org.gnome.DejaDup.GCS
org.gnome.DejaDup
org.gnome.rhythmbox.plugins.lyrics
org.gnome.settings-daemon.peripherals.mouse
org.gnome.rhythmbox.plugins.generic-player
org.gnome.evolution.plugin.email-custom-header
org.gnome.gedit.plugins.wordcompletion
org.freedesktop.Tracker.Extract
org.gnome.shell.extensions.window-list
org.gnome.settings-daemon.plugins.print-notifications
org.gnome.totem.plugins.pythonconsole
org.gnome.Empathy
org.gnome.nautilus.desktop

You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.

Install and configure samba on Ubuntu 15.10

If you had tried to install and failed, let’s first remove the failed settings and reinstall Samba:

sudo apt-get purge samba samba-common
sudo apt-get install -y samba samba-common python-glade2 system-config-samba

We’ll now create a brand new Samba configuration:
cp -pf /etc/samba/smb.conf /etc/samba/smb.conf.bak
sudo su
cat /dev/null > /etc/samba/smb.conf
exit
sudo gedit /etc/samba/smb.conf

And add the following to the file:

[global]
workgroup = WORKGROUP
server string = Samba Server %v
netbios name = ubuntu
security = user
map to guest = bad user
dns proxy = no

#============================ Share Definitions ============================== 

[Anonymous]
path = /samba/anonymous
browsable =yes
writable = yes
guest ok = yes
read only = no
force user = nobody

Create a anonymous share, set permissions and restart samba daemon:

mkdir -p /samba/anonymous
chmod -R 0755 /samba/anonymous/
chown -R nobody:nogroup /samba/anonymous/
service smbd restart

Adding a removable drive, mounted at /media/joel/Ultra 2TB:
Add the following to smb.conf:

[tv]
	path = /media/joel/Ultra 2TB/tv
	writeable = yes
;	browseable = yes
	guest ok = yes
	force user = joel

joel is the actual username. Restart smbd.

In case the network is not visible, install the following:
sudo apt install smbclient

and check the status by running smbtree. It may report invalid entries:

smbtree
Unknown parameter encountered: "password level"
Ignoring unknown parameter "password level"
Unknown parameter encountered: "update encrypted"
Ignoring unknown parameter "update encrypted"

Fix those errors and restart the following:

sudo service nmbd restart
sudo service smbd restart

You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.

How to install Brother DCP-7060D on Ubuntu

Visit the Linux driver(.deb) download page for Brother DCP-7060D.
Download the “Driver Install Tool”
Run the following:

gunzip linux-brprinter-installer-2.0.0-1.gz
sudo su 
bash linux-brprinter-installer-2.0.0-1

Now you will asked: “Input model name ->”
Type: DCP-7060D
and type Y to all the prompts until you reach this question:
“Will you specify the DeviceURI ?”
Here, specify No if you have the printer connected to USB (7060D has no direct network support).

After installation continues, try to print a test page. It didnt succeed for me and I found that Linux was “waiting for the printer to respond”.

At this point, I opened “Printers” from Unity, deleted the printer that was automatically installed, and clicked on “Add new printer”, and chose the entry corresponding to DCP-7060D. Now the test page worked.

Troubleshooting:
For some odd reason, on my new Ubuntu 14.04 installation, www.brother.com could not be resolved by the installation script (wget timeout). I had to manually add the following line to /etc/hosts:

23.55.58.66 www.brother.com

Installing Scanner drivers:
Download the scanner DEBs from the download page

dpkg -i --force-all brscan4-0.4.3-2.amd64.deb 
dpkg -i --force-all brscan-skey-0.2.4-1.amd64.deb
dpkg -i --force-all brother-udev-rule-type1-1.0.0-1.all.deb

After installation, CUPS can be managed from http://localhost:631/printers

Manufacturer instructions for installation:
Login as a superuser ( or use “sudo” option if it is required )

Check if pre-required procedures are completed
For Debian/Ubuntu 64 bit
For Ubuntu8.04 or greater

Download drivers
Download LPR driver and cupswrapper driver.

Install LPR driver and cupswrapper driver
Turn on the printer and connect the USB cable.
Open the terminal and go to the directory where the drivers are.
Install LPR driver.The install process may take some time. Please wait until it is complete.
Command (for dpkg) : dpkg -i –force-all (lpr-drivername)

Install cupswrapper driver.The install process may take some time. Please wait until it is complete.
Command (for dpkg) : dpkg -i –force-all (cupswrapper-drivername)

Check if the LPR driver and cupswrapper driver are installed
Command (for dpkg) : dpkg -l | grep Brother

Depending on the connection type you are using (USB or Network), follow one of the steps below.

(for USB Connection)
Open a web browser and go to “http://localhost:631/printers”.
Check if the Device URI of your printer is “usb://Brother/(your printer’s model name)”

If the device URI is different from the example above, please go to “Modify Printer” of your printer to select proper device and driver.
If your printer is not listed on “http://localhost:631/printers”, please go to “http://localhost:631/admin” and click “Add printer” and select proper device and driver.

(for Network Connection)

Open a web browser and go to “http://localhost:631/printers”.
Click “Modify Printer” and set following parameters.
– “LPD/LPR Host or Printer” or “AppSocket/HP JetDirect” for Device
– lpd://(Your printer’s IP address)/binary_p1 for Device URI
– Brother for Make/Manufacturer Selection
– Your printer’s name for Model/Driver Selection
Try a test print
Open a text editor, write something and select “print” from the menu.


You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.

How to compile the latest development version of smplayer on Ubuntu?

Updated on 2 May, 2017
Compile the latest smplayer on Ubuntu(New):
We’ll be building smplayer, smplayer-themes, and smplayer-skins.
Install dependencies:

sudo apt build-dep smplayer
sudo apt-get install libqt4-dev zlib1g-dev fakeroot build-essential devscripts debhelper g++ mplayer2

Get source from the svn and build each package:

mkdir ~/src
cd ~/src
svn co https://subversion.assembla.com/svn/smplayer/smplayer/trunk/ smplayer
cd smplayer
./create_deb.sh
svn co https://subversion.assembla.com/svn/smplayer/smplayer-skins/trunk/ smplayer-skins
cd smplayer-skins
./create_deb.sh
cd ..
svn co https://subversion.assembla.com/svn/smplayer/smplayer-themes/trunk/ smplayer-themes
cd smplayer-themes
./create_deb.sh
cd ..
sudo dpkg -i smplayer*deb

Hurray, we’ve successfully built and installed the latest dev version of smplayer.

To update to latest version:
smplayer will notify new update releases. Once updated, we can compile new one:

svn update
./create_deb.sh
sudo dpkg -i ../smplayer_17.5.0_amd64.deb

Note: I found that on playing, smplayer did not have any sound. I had to change my default audio device to pulse.
Options:Preferences:
Audio>Output driver: pulse

Older post:
First, download the latest smplayer tarball from the official site.

Eg:

wget http://downloads.sourceforge.net/project/smplayer/SMPlayer/16.9.0/smplayer-16.9.0.tar.bz2

Extract it:

tar jxf smplayer*bz2
cd smplayer*

Install essential prerequisites for building:

sudo apt-get install libqt4-dev zlib1g-dev fakeroot build-essential devscripts debhelper g++ mplayer2
sudo apt-get -f install

Now create the .deb package:

./create_deb.sh

Install the package:

sudo dpkg -i ../smplayer_16.9.0_amd64.deb

Alternately download the .deb after installing the prerequisites:

http://sourceforge.net/projects/smplayer/files/Unstable/ubuntu/

You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.

Windows system time keeps resetting to UTC

I asked the following question on AskUbuntu:

I’ve been noticing a peculiar issue with Ubuntu recently, in that booting to Ubuntu from Windows seems to be messing with the System time.

Eg: I shutdown Windows at 8:35pm, to boot into Ubuntu. When Ubuntu was started up, instead of showing time as 8:35 pm, it showed 3:05 pm momentarily, before setting itself to 8:35pm. If Windows is restarted after this happens, time now becomes 3:05pm (which seems to be UTC time)

If Windows alone is restarted (Meaning booting up Windows after shutting down Windows), no time fluctuation occurs. If Ubuntu is started up after Windows is shutdown, the same issue happens. Time seems momentarily UTC, and then corrected within a second or so after startup, to correct time. However the next time Windows is booted up, the time becomes the same as that which was momentarily displayed on Ubuntu. I hope I’m making this clear.

I’ve checked that my timezone is correct in Ubuntu. It is set as Asia/Kolkata. I even did a dpkg-reconfigure tzdata, but it was already correct timezone.

My timezone is Asia/Kolkata, which is UTC+5.30 hours. The time which appears incorrectly is the correct time if my timezone was UTC. I have a Multiboot with grub2, managing Ubuntu 13.04 and Windows 8. PC is an Acer Aspire V5-121 Netbook purchased two days ago.

Correct Solution (As answered by the community of AskUbuntu):

When this happens on a dual-boot system, it’s usually because one operating system thinks the hardware clock tracks local time, while the other operating system thinks the hardware clock tracks UTC.

In your case, your hardware clock is probably set to the local time, and:

  • Windows is set to use local time, which (given your time settings) is correct.
  • Ubuntu is set to use UTC, which (given your time settings) is incorrect.

If you were to just reset the time in the Ubuntu system, either manually or automatically, it would then be wrong in Windows, so that’s not a good solution.

Instead, the best solution is probably to reconfigure Ubuntu to treat the hardware clock time as local time (then you can leave your Windows configuration, and your hardware clock time, alone).

To do this, edit /etc/default/rcS as root and make sure it has UTC=no:

  1. Press Alt+F2.
  2. Type gksu gedit /etc/default/rcS and press Enter.
  3. You’ll probably see this:
    # assume that the BIOS clock is set to UTC time (recommended)
    UTC=yes
    [/code]
    
    • If you do, change UTC=yes to UTC=no. (Or you might want to add a comment too, by changing it to something like UTC=no # changed to accommodate Windows system. Everything on a line after a # character is a comment, and is there just to make your settings more human-readable.)
    • If you don't, look for any UTC= line. If it's uncommented (i.e., doesn't have a # at the beginning), change it accordingly. If it is commented, uncomment it by removing the leading # and make sure it says UTC=no.
  4. Save the file and quit the text editor.
  5. Reboot to apply your changes and check that the time is working properly now on both operating systems.
Source: Ask Ubuntu On Crunchbang, the same issue occured, and the above solution didnt work. When I booted to Windows from Linux or vice versa, clock became reset to UTC. Apparently editing /etc/default/rcS has become outdated. The solution is to run the following:
sudo hwclock --systohc --localtime

which sets the following:
0.088933 1387202722 0.000000
1387202722
LOCAL

instead of:
0.088933 1387202722 0.000000
1387202722
UTC
in /etc/adjtime

which seems to be the newer method.


You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.

Preparing Ubuntu or Debian for dsixda android kitchen

You need to clone the repo:

git clone https://github.com/dsixda/Android-Kitchen

Install java jdk:

sudo apt-get install openjdk-7-jdk

If java installation stalls, you may need to update your apt sources:

#cat /etc/apt/sources.list
deb http://archive.ubuntu.com/ubuntu oneiric main restricted universe
deb http://archive.ubuntu.com/ubuntu oneiric-updates main restricted universe
deb http://security.ubuntu.com/ubuntu oneiric-security main restricted universe multiverse
deb http://archive.canonical.com/ubuntu oneiric partner
deb http://mirror.de.leaseweb.net/ubuntu oneiric main restricted universe
deb http://mirror.de.leaseweb.net/ubuntu oneiric-updates main restricted universe
deb http://mirror.de.leaseweb.net/ubuntu oneiric-security main restricted universe multiverse
deb http://mirror.de.leaseweb.net/ubuntu oneiric partner

Now,

apt-get update
sudo apt-get install openjdk-7-jdk

Install other necessary packages:

apt-get install zip build-essential

Debian squeeze apparently does not have a package for openjdk, and requires installation from source (which I havent explored yet). I found it easier to upgrade squeeze to wheezy. The latter does have the package:

The method is:

sed -i 's/squeeze/wheezy/g' /etc/apt/sources.list
apt-get update
apt-get upgrade ; apt-get dist-upgrade
apt-get install openjdk-7-jdk

 


You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.

Install wine in Debian (Newer versions)

The wine on Debian is too old-1.0.1.

To installer newer 1.3 version, you can add a new ppa:

sudo add-apt-repository ppa:ubuntu-wine/ppa
[sudo] password for droidzone: 
ubuntu-wine/ppa
Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /etc/apt/secring.gpg --trustdb-name /etc/apt/trustdb.gpg --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver keyserver.ubuntu.com --recv-keys 5A9A06AEF9CB8DB0
gpg: requesting key F9CB8DB0 from hkp server keyserver.ubuntu.com
gpg: key F9CB8DB0: public key "Launchpad PPA for Ubuntu Wine Team" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)

 

[[email protected] ~]$sudo apt-get install wine1.3
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libwine-alsa wine-utils libwine libwine-ldap wine-bin libwine-gphoto2 libwine-print libwine-cms libwine-gl libwine-sane
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  binfmt-support libmpg123-0 libwbclient0 samba-common samba-common-bin ttf-mscorefonts-installer ttf-symbol-replacement-wine1.3
  ttf-umefont ttf-unfonts-core ttf-wqy-microhei unrar winbind wine wine1.3-gecko winetricks
Recommended packages:
  ttf-droid
The following NEW packages will be installed:
  binfmt-support libmpg123-0 samba-common samba-common-bin ttf-mscorefonts-installer ttf-symbol-replacement-wine1.3 ttf-umefont
  ttf-unfonts-core ttf-wqy-microhei unrar winbind wine1.3 wine1.3-gecko winetricks
The following packages will be upgraded:
  libwbclient0 wine
2 upgraded, 14 newly installed, 0 to remove and 140 not upgraded.
Need to get 147 MB of archives.
After this operation, 331 MB of additional disk space will be used.
Do you want to continue [Y/n]?

 


You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.

Debian apt-get broken packages

I tried to reinstall startup-manager recently after aptitude auto uninstalled it, and got the following error:

[[email protected] droidzone]#sudo apt-get install startupmanager
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 initscripts : Breaks: console-setup (&lt; 1.74) but 1.68+squeeze2 is to be installed
               Breaks: nfs-common (&lt; 1:1.2.5-3) but 1:1.2.2-4squeeze2 is to be installed
 keyboard-configuration : Breaks: console-setup (&lt; 1.71) but 1.68+squeeze2 is to be installed
 startupmanager : Depends: python-glade2 (&gt;= 2.12) but it is not going to be installed
                  Depends: python-gnome2 (&gt;= 2.20) but it is not going to be installed
                  Depends: yelp but it is not going to be installed
E: Broken packages

I took a look at my apt sources list and found that as suggested I had updated the sources list to include the sid repos, which apparently did not have all the correct packages. So I commented out a few lines and fixed it.

# deb cdrom:[Debian GNU/Linux 6.0.4 _Squeeze_ - Official Snapshot i386 LIVE/INSTALL Binary 20120129-12:44]/ squeeze main

#deb cdrom:[Debian GNU/Linux 6.0.4 _Squeeze_ - Official Snapshot i386 LIVE/INSTALL Binary 20120129-12:44]/ squeeze main

#deb http://security.debian.org/ squeeze/updates main
#deb-src http://security.debian.org/ squeeze/updates main

#Additions come below:

#For module-assistant and nvidia-kernel-common
#deb http://ftp.de.debian.org/debian squeeze main contrib non-free
#deb http://ppa.launchpad.net/jtaylor/keepass/ubuntu lucid main
deb http://ftp.us.debian.org/debian stable main contrib non-free
#deb http://ftp.us.debian.org/debian sid main contrib non-free
#deb http://ppa.launchpad.net/shutter/ppa/ubuntu lucid main
#deb http://ppa.launchpad.net/echidnaman/qapt/ubuntu lucid main

The only line I left is:

deb http://ftp.us.debian.org/debian stable main contrib non-free

Followed by:

[[email protected] droidzone]#sudo apt-get update
Hit http://ftp.us.debian.org stable Release.gpg   
Ign http://ftp.us.debian.org/debian/ stable/contrib Translation-en
Ign http://ftp.us.debian.org/debian/ stable/contrib Translation-en_IN
Ign http://ftp.us.debian.org/debian/ stable/main Translation-en
Ign http://ftp.us.debian.org/debian/ stable/main Translation-en_IN
Ign http://ftp.us.debian.org/debian/ stable/non-free Translation-en
Ign http://ftp.us.debian.org/debian/ stable/non-free Translation-en_IN
Hit http://ftp.us.debian.org stable Release
Hit http://ftp.us.debian.org stable/main i386 Packages
Hit http://ftp.us.debian.org stable/contrib i386 Packages
Hit http://ftp.us.debian.org stable/non-free i386 Packages
Reading package lists... Done
[[email protected] droidzone]#sudo apt-get install startupmanager
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  gnome-user-guide libwebkit-1.0-2 python-gnome2 yelp
Suggested packages:
  python-gnome2-doc
The following NEW packages will be installed:
  gnome-user-guide libwebkit-1.0-2 python-gnome2 startupmanager yelp
0 upgraded, 5 newly installed, 0 to remove and 93 not upgraded.
Need to get 5,513 kB/21.6 MB of archives.
After this operation, 60.5 MB of additional disk space will be used.
Do you want to continue [Y/n]? y

 


You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.