Author Topic: Quick guide to installing useful stuff on (X)ubuntu  (Read 10542 times)

0 Members and 1 Guest are viewing this topic.

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Quick guide to installing useful stuff on (X)ubuntu
« on: August 14, 2014, 05:59:32 pm »
I wrote this thing mainly because it was a pain having to figure out and reinstall every one of these little things each of the four times I had to reinstall Xubuntu on my computer in the last six months. Hopefully I don't have to do it again, but it's still nice to have around because some of these things are a bit out of the way. I know some people here use Xubuntu/XFCE so I thought I'd share:
Spoiler For Spoiler:
Calculators
===========

TiLP
----

Download and install TiLP from <http://lpg.ticalc.org/prj_tilp/linux.html>.

Launch with `sudo tilp`.

TilEm
-----

Installation:

1.  Download TilEm sources from
    <http://lpg.ticalc.org/prj_tilem/download.html>.
2.  Change to `LIBS = -lm` in tilem-2.0/gui/Makefile.
3.  Install as normal.

Development
===========

LaTeX
-----

Installation:

1.  Download and install TeX Live from
    <https://www.tug.org/texlive/acquire-netinstall.html>.
2.  Append `PATH="$PATH:/usr/local/texlive/2014/bin/x86_64-linux"` to
    ~/.profile.

Geany
-----

Set line-breaking to 80 in *Edit > Preferences > Editor > Features* and *Edit >
Preferences > Editor > Display*.

Add keyboard shortcut `<Primary><Alt>s` > *Save As*.

Add ` && rm "%e.aux" "%e.log"` to the end of each LaTeX build command.

Add `evince %e.pdf` and `evince %e.dvi` to LaTeX execute commands.

Geany plugins
-------------

    sudo apt-get install geany-plugins geany-plugin-markdown

Set Web helper preview pane to *Sidebar*.

Change any external open commands to `thunar "%d"` and show all hidden files.

Emmet
-----

Installation:

1.  Download and install GeanyPy from
    <https://github.com/sagarchalise/geanypy/tree/gtk3>, ignoring any Automake
    errors.
2.  Download and extract the emmet folder from
    <https://github.com/sergeche/emmet-sublime> to /usr/lib/geany/geanypy.
3.  Download and extract PyV8.py and _PyV8.so from
    <https://github.com/emmetio/pyv8-binaries/blob/master/pyv8-linux64.zip> to
    /usr/lib/geany/geanypy.
4.  Download and extract editor.js and geanypy-emmet.py from
    https://github.com/sagarchalise/geanypy-emmet> to
    ~/.config/geany/plugins/geanypy/plugins.

Fix indentation in expansions by commenting out the `if (!noIndent)` block in
~/.config/geany/plugins/geanypy/plugins/editor.js.

LAMP stack
==========

Source:
<https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu>

Apache
------

    sudo apt-get install apache2

To allow sites from mounted USB devices, change `APACHE_RUN_USER` and
`APACHE_RUN_GROUP` in /etc/apache2/envvars to the current user and group,
respectively.

Enable .htaccess files by changing to `AllowOverride All` in
/etc/apache2/apache2.conf.

Enable automatic virtual hosts:

1.  Add `UseCanonicalName Off` and `VirtualDocumentRoot /var/www/%0` to
    configuration.
2.      cd /var/www && ln -s html localhost
3.  Add any additional virtual hosts as 127.0.0.1 in /etc/hosts.

PHP
---

    sudo apt-get install php5 php5-mcrypt

Enable short tags by changing to `short_open_tag = On` in
/etc/php5/apache2/php.ini.

Enable short tags by changing to `display_errors = On` in
/etc/php5/apache2/php.ini.

MySQL
-----

Installation:

1.      sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql
2.      sudo mysql_install_db
3.      sudo mysql_secure_installation

Media
=====

Clementine
----------

    sudo apt-get install clementine xubuntu-restricted-extras

Add keyboard shortcuts:

*   `XF86AudioPlay` => `clementine -t`
*   `XF86AudioStop` => `clementine -s`
*   `XF86AudioPrev` => `clementine -r`
*   `XF86AudioNext` => `clementine -f`

Webcam
------

    sudo apt-get install guvcview

Change file paths in *Video > File* and *Photo > File* to default locations in
~/Videos and ~/Pictures, respectively.

System
======

App Grid
--------

Installation:

1.      sudo add-apt-repository ppa:appgrid/stable
2.      sudo apt-get update
3.      sudo apt-get install appgrid

Power Statistics
----------------

    sudo apt-get install gnome-power-manager

Show in menus by commenting out the `OnlyShowIn` line in
/usr/share/applications/gnome-power-statistics.desktop.

VirtualBox
----------

Installation:

1.      sudo apt-get install virtualbox
2.  Download and install extension pack from
    <https://www.virtualbox.org/wiki/Downloads>.

USB access:

1.  Add `woot` to `vboxusers` group in /etc/group.
2.  Check *Settings > USB > Enable USB 2.0 (EHCI) Controller* for each OS that
    supports it.

Miscellaneous
=============

Desktop sharing
---------------

Installation:

1.      sudo apt-get install vino
2.      gsettings set org.gnome.Vino require-encryption false

Show in menus by commenting out the `OnlyShowIn` line in
/usr/share/applications/vino-preferences.desktop.

Launch with `/usr/lib/vino/vino-server`.

Backlight controls
------------------

    sudo apt-get install xbacklight

Add keyboard shortcuts:

*   `Super+Left` => `xbacklight -dec 10`
*   `Super+Right` => `xbacklight -inc 10`

**Do not** hold down these keyboard shortcuts!

Window manager
--------------

Enable unfocused scrolling by unchecking *Window Manager Tweaks >
Accessibility > Raise windows when any mouse button is pressed*.

Enable scrollwheel to shade on window title by checking *Settings Editor >
xfwm4 > mousewheel_rollup*.

Add keyboard shortcuts:

*   `Ctrl+Alt+5` => *Fill window*
*   `Shift+Ctrl+Alt+Up` => *Move window to upper workspace*
*   `Shift+Ctrl+Alt+Down` => *Move window to bottom workspace*
*   `Shift+Ctrl+Alt+Left` => *Move window to left workspace*
*   `Shift+Ctrl+Alt+Right` => *Move window to right workspace*
*   `Ctrl+Alt+8` => *Tile window to the top*
*   `Ctrl+Alt+2` => *Tile window to the bottom*
*   `Ctrl+Alt+4` => *Tile window to the left*
*   `Ctrl+Alt+6` => *Tile window to the right*
A lot of it is probably pretty specific to my preferences, but there are things like setting up a LAMP stack and calculator dev tools (which aren't specific to Xubuntu/XFCE) that might come in handy.

EDIT: It's in Markdown format, so copy-and-paste it in to here to see a prettier version.
« Last Edit: August 18, 2014, 07:34:06 pm by Deep Thought »




Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Quick guide to installing useful stuff on (X)ubuntu
« Reply #1 on: August 15, 2014, 02:11:06 am »
Haha ! I understand why you did that list, I reinstalled Lubuntu 3 times this month and had to get everything back each time :P

For TiLP, there is a way to install it without super user rights. If you installed it with the installation script, then you should have seen at the end "If you want to use it as a non root user, follow the instructions in ...". Then, the path given is wrong :P
But the instruction still exist and are located in /home/you/lpg/tilp/tilibs/libticables/trunk/CONFIG ;)

Then, for xbacklight, I also have to add some lines somewhere before being able to control brightness.
Same for my mouse.
Then I have to install vim and get its vimrc back.
Of course not forgetting about my bash{rc,_aliases} files.
And I get all my shortcuts back really quickly since I use the same xml on all my laptops, I just have to copy paste it :P

For the rest, I see when I need them.
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Quick guide to installing useful stuff on (X)ubuntu
« Reply #2 on: August 15, 2014, 03:37:53 am »
Yeah, for vimrc and bashrc I just copy backed up files back into place so it's not really worth documenting.

Off-topic: Looks like I'm really good at backing my stuff up now. Wish I'd've'd that habit back with my earlier calculator games :/




Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: Quick guide to installing useful stuff on (X)ubuntu
« Reply #3 on: August 15, 2014, 10:47:06 am »
I thought about making me a shell script once for arch installs because why not :P

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Quick guide to installing useful stuff on (X)ubuntu
« Reply #4 on: August 15, 2014, 12:06:39 pm »
I did consider that too for these installations/configurations, but I don't know how to do search/replace by shell script.




Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Quick guide to installing useful stuff on (X)ubuntu
« Reply #5 on: August 15, 2014, 12:34:06 pm »
For that, you could use a program written with another language. I used a high level (to write it faster) compiled language to convert ppm images (saved as P3, ascii) into hex, then convert the same image but flipped horizontally into hex, and called that in a script that first uses imagemagick to convert any image into a ppm ;)
So I guess you could do something like that too for your needs :)
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Quick guide to installing useful stuff on (X)ubuntu
« Reply #6 on: August 15, 2014, 02:45:15 pm »
For TiLP, there is a way to install it without super user rights. If you installed it with the installation script, then you should have seen at the end "If you want to use it as a non root user, follow the instructions in ...". Then, the path given is wrong :P
But the instruction still exist and are located in /home/you/lpg/tilp/tilibs/libticables/trunk/CONFIG ;)
I actually found those instructions but didn't follow through because they seemed too complicated, and sudo tilp is five characters longer than running without root :P

Sidenote, looks like TiLP doesn't really work reliably with USB 3.0 ports.




Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Quick guide to installing useful stuff on (X)ubuntu
« Reply #7 on: August 16, 2014, 03:51:10 am »
I actually found those instructions but didn't follow through because they seemed too complicated, and sudo tilp is five characters longer than running without root :P
Well yeah, if you run it with the terminal, writing sudo won't kill you (even though with your password, it's a bit more than 5 characters :P). But when I use TiLP, I use the icon on one of my panels and am too lazy to type my password in everytime so I followed those instructions once and for all :P
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: Quick guide to installing useful stuff on (X)ubuntu
« Reply #8 on: August 17, 2014, 10:10:15 pm »
I did consider that too for these installations/configurations, but I don't know how to do search/replace by shell script.
That's what sed is for ;)

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Quick guide to installing useful stuff on (X)ubuntu
« Reply #9 on: August 17, 2014, 11:56:23 pm »
Well then, thanks for the tip.

There are still some minor issues, such as having to type in a root password for MySQL installation, but that should help streamline some of the other parts :D




Offline shmibs

  • しらす丼
  • Administrator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2132
  • Rating: +281/-3
  • try to be ok, ok?
    • View Profile
    • shmibbles.me
Re: Quick guide to installing useful stuff on (X)ubuntu
« Reply #10 on: August 18, 2014, 11:59:56 am »
sed is best. here's a line from my panel:

Code: [Select]
hc tag_status | tr '\t' '\n' | sed \
-e '1d' \
-e '$d' \
-e 's/\(.*\)/\1 /' \
-e 's/:/ /' \
-e "s/[#+\-%]\(.*\)/%{B${bg_focus} F${fg_focus}} \1%{B${bg_normal} F${fg_normal}}/" \
-e "s/!\(.*\)/%{B${bg_urgent} F${fg_urgent}} \1%{B${bg_normal} F${fg_normal}}/" \
-e "s/\.\(.*\)/%{B${bg_normal} F${fg_grey}} \1%{B${bg_normal} F${fg_normal}}/" \
| tr -d '\n'

and yeah, shells are meant to just be the glue that binds together other programs

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Quick guide to installing useful stuff on (X)ubuntu
« Reply #11 on: August 18, 2014, 07:34:56 pm »
Added a section for installing Emmet (for web developers) on Geany because it was annoyingly complicated x.x