Command line is indispensable for living with Linux. Not a distro adventurer myself, having tried only Ubuntu, Elementary OS, and stucked with Xubuntu, I found these commands worthy of keeping, courtesy of various communities and support forums. By the way, you will need to change the red colored values to desired ones!
Managing Local Repository
We might want to archive our DEB packages locally; we need to install dpkg-dev then. Package manager with GUI can be used, but this code is sufficient.
Use Synaptic Package Manager if you want some GUI!
sudo apt-get install dpkg-dev
We then put the DEB packages into a folder. Let us make, for example, a repository
folder in our home directory. Fill the folder with the DEB packages and add the folder to software sources list with this command!
Use Software and Updates if you want some GUI! The sources list is in Other Software tab.
sudo apt-add-repository deb file:/home/your-account-name/repository/ ./
Navigate to our local repository folder, and execute this command!
Sorry, I could find no GUI method.
dpkg-scanpackages . /dev/null > Packages
Finish with hence command!
Use Synaptic Package Manager if you want some GUI!
sudo apt-get update
With the release of updates, we might end up having same packages with different versions. Deleting the old ones manually is feasible for small repository. For big one, however, use this script! We don't have to navigate to our local repository to execute the process.
Sorry, no GUI.
sudo dpkg-scanpackages /home/your-account-name/repository 2>&1 >/dev/null | grep -Po '((\/.*?deb)(?=.*?repeat;))|used that.*?\K(\/.*deb)' | xargs rm
Managing Video Files
We will need to install Mencoder and AVConv. Open terminal and roll this command!
As always, Synaptic for the GUI is.
sudo apt-get install mencoder libav-tools
Do you need to crop some videos? Here is the recipe.
avconv -i input-file.mp4 -vf crop=output-width:output-height:leftmost-crop-start:topmost-crop-start output-file.mp4
Merge the videos with this.
mencoder -ovc lavc -oac mp3lame video1.mp4 video2.mp4 -o completevideo.mp4
Video trimming is done with hence command.
avconv -i input-file.mp4 -ss start-hour:start-minute:start-second -t duration-hour:duration-minute:duration-second output-file.mp4
As for clockwise 90° video rotation, use the following command.
avconv -i input-file.mp4 -vcodec libx264 -preset medium -crf 24 -threads 0 -vf transpose=1 -acodec copy output-file.mp4
For the above-mentioned three actions on video files, we have to navigate to the videos' directory and, sorry, I have found no GUI method.
Managing ATI Graphics Driver
Choosing the proprietary driver is easy with the GUI, but the uninstallation is not. (My first uninstallation trial years ago left me broken system.) Hence my fellow ATI Graphics user, here is how to revert back to open-source driver, only to pick the proprietary ones after.
Given that the code is correctly entered, we can safely ignore any error messages that appear after the processes.
sudo apt-get remove --purge fglrx fglrx_* fglrx-amdcccle* fglrx-dev*
sudo rm /etc/X11/xorg.conf
For 32-bit systems, follow-up with hence!
sudo apt-get install --reinstall xserver-xorg-core libgl1-mesa-glx libgl1-mesa-dri
Use this instead for 64-bit systems!
sudo apt-get install --reinstall libgl1-mesa-glx:i386 libgl1-mesa-glx:amd64 libgl1-mesa-dri:i386 libgl1-mesa-dri:amd64 xserver-xorg-core
Configure Xorg, we will need to, and reboot to finish the task.
sudo dpkg-reconfigure xserver-xorg
sudo reboot
If we use binary driver provided by ATI, uninstallation is quite straightforward. I cannot recall how, but we will need to run uninstallation script already provided. Read the documentation of binary to find the guides!
Tidak ada komentar:
Posting Komentar