Fedora 20 - uses GNOME-Shell
FYI - Fedora 20 uses GNOME-Shell, not Cinnamon (as I thought earlier)! Cinnamon is a fork of GNOME-Shell and might be used by Mint Linux?
Windows Desktop Icons - Auto Arrange
Problem: the desktop icons don't move (you can't drag and move the icons).
Solution: right click the desktop, click “View”, uncheck “Auto arrange icons”.
Solution: right click the desktop, click “View”, uncheck “Auto arrange icons”.
Ensuring new files in a directory belong to the group
Issue: I want to create a shared directory when a number of users (all belong to a group called mygroup) can create and edit files. I would like all files, including new files created in this directory and subdirectories to belong to the mygroup.
SSH and Port Forwarding
(I) SSH with X. To simply get X over SSH, do
(II) No X? If you installed fedora with minimal package set, you may see:
Here we forward port 1143 on localhost to 143 (IMAP) on imap.example.com.
ssh -X name@machine xterm
(II) No X? If you installed fedora with minimal package set, you may see:
$ ssh -YC remotebox
[major@remotebox ~]$ xterm
xterm: Xt error: Can't open display:
xterm: DISPLAY is not set
source(III) Simple Port Forwarding
Here we forward port 1143 on localhost to 143 (IMAP) on imap.example.com.
- ssh -f -N -q -L 1143:localhost:143 username@imap.example.com
- -f tells ssh to go into the background (daemonize).
- -N tells ssh that you don't want to run a remote command. That is, you only want to forward ports.
- -q tells ssh to be quiet
- -L specifies the port forwarding
Source: Main, Also
How long did that command take to run?
SIMPLE ANSWER
Simply use the command time to see how long it took to execute
$> time cp -R sourcefolder targetfolder
real 0m21.093s
user 0m0.008s
sys 0m0.717s
real - is the full time it took to run the command (how long you waited).
user - is the CPU time used by the program itself.
sys - is the CPU time used by the system calls
Perhaps also see GNU time as an alternative?
Source
POWER ANSWER
Measure time of program execution and store that inside a variable
Simply use the command time to see how long it took to execute
$> time cp -R sourcefolder targetfolder
real 0m21.093s
user 0m0.008s
sys 0m0.717s
real - is the full time it took to run the command (how long you waited).
user - is the CPU time used by the program itself.
sys - is the CPU time used by the system calls
Perhaps also see GNU time as an alternative?
Source
POWER ANSWER
Measure time of program execution and store that inside a variable
usr@srv $ mytime="$(time ( ls ) 2>&1 1>/dev/null )"
usr@srv $ echo "$mytime"
real 0m0.006s
user 0m0.001s
sys 0m0.005s
Perhaps even just use date command, and measure differences from start to finish.Source: unix.stackexchange.comSTART=$(date +%s.%N) command END=$(date +%s.%N) DIFF=$(echo "$END - $START" | bc) # echo $DIFF
RCS - Simple Version Control
RCS is a great simple version control. No need to create repositories. Just use it in place! Create the file, then just check it in (creates initial archived version-controlled file: filename,v). Then just check it out again to do editing.
Check in: $ ci -u inetd.conf
Check out: $ co -l services
Common RCS operations:
Source: O'Reilly: The Five-Minute RCS Tutorial - Automating System Administration with Perl
also see: http://www.yolinux.com/TUTORIALS/LinuxTutorialRCSintro.html
BTW: think co -l as being "locked" from use by other programmers (one edit at a time). It may not be necessary to use -u to unlock the file.
Check in: $ ci -u inetd.conf
Check out: $ co -l services
Common RCS operations:
| RCS operation | Command line |
|---|---|
| Initial check-in of file (leaving file active in filesystem) | ci -u filename |
| Check out with lock | co -l filename |
| Check in and unlock (leaving file active in filesystem) | ci -u filename |
| Display version x.y of a file | co -px.y filename |
| Undo to version x.y (overwrites file active in filesystem with the specified revision) | co -rx.y filename |
| Diff file active in filesystem and last revision | rcsdiff filename |
| Diff versions x.y and x.z | rcsdiff -rx.y -rx.zfilename |
| View log of check-ins | rlog filename |
| Break an RCS lock held by another person on a file | rcs -u filename |
Source: O'Reilly: The Five-Minute RCS Tutorial - Automating System Administration with Perl
also see: http://www.yolinux.com/TUTORIALS/LinuxTutorialRCSintro.html
BTW: think co -l as being "locked" from use by other programmers (one edit at a time). It may not be necessary to use -u to unlock the file.
Yum Extender Symbols
From the Yum Extender FAQ [link]
Q. What does the package colors mean ?
Red = Package is a update to a installed package.Blue = Package is obsoleting a installed package.Green = Package is installed.Black = Available package.
Q. What does the "green plus " / "star on rectangle (document)" means ?
The "green plus " / "star on rectangle" means that a packages is recent.
- If it is in the update/install view it means that this version of the package has been added to the repository in the last 14 days.
- If it is in the remove view it means that the package as been installed on the system in the last 14 days.
Fedora 20 Post-Install Customization
After the default install, there are some sysadmin things your Fedora 20 install more usable:
- First, update the system:
- $> yum update
- To get a nicer/more user-friendly experience with Fedora 20, install easyLife rpm, and use it to
- replace nouveau video drivers with nVidia drivers (current drivers are fine)
- btw: the lenovo T510 has nVidia GT218 [NVS 300] Video
- btw: check which driver you are using
- $> lspci | grep VGA
- btw: check which module is loaded:
- $> lsmod | grep nouveau
- install flash
- install codecs
- install video players
- install java
- install fonts
- install utils
- install SetupWindows
- Install gnome-tweak-tool
- To install KDE: (link)
- $> yum install @kde-desktop
- To install Xfce: (link)
- Install switchdesk utility:
- $> yum install switchdesk switchdesk-gui
- Install Xfce:
- $> yum install @xfce
- Now, make Xfce desktop the default:
- $> switchdesk xfce
yum Commands
List commands (including a list of installed packages, or ones ready to be updated)
Install a package
Install a group of packages (don't forget quotation marks)
Search for a package
Remove a package
Update via yum (including a list that need to be updated)
Notable links:
yum list
yum list installed|less
yum list updates|less
Install a package
yum install package
Install a group of packages (don't forget quotation marks)
yum groupinstall "groupname"
Search for a package
yum search
yum search package
Remove a package
yum remove package
Update via yum (including a list that need to be updated)
yum update
Notable links:
Take a Screenshot in Fedora 20
Press the [PrtSc] button (just don't keep it pressed down too long!) The screenshots show up under
~/Pictures. The default picture viewer in Fedora 20 is "shotwell".
Logout in Fedora 20
Add a logout button in the menu (under the power button), because there apparently isn't a logout button in Fedora 20. (source)
$> gsettings set org.gnome.shell always-show-log-out true
Setup Dropbox on Fedora
RECOMMENDED. Simply download the Dropbox rpm (Dropbox RPMs
You can even install and control via Dropbox via commandline (important for server/non-graphical node situations) (see above)
OR. Compile from source (Dropbox RPMs here too
You can even install and control via Dropbox via commandline (important for server/non-graphical node situations) (see above)
OR. Compile from source (Dropbox RPMs here too
Get Motherboard Information in Windows
To get information on what motherboard you've got in your computer, you can either crack open your case, or you can run a simple built-in command. Simply start a windows command line session (C:\Windows\system32\cmd.exe). (Source link)
C:\Users\Username> wmic baseboard get product,Manufacturer,version,serialnumber
Chrome Complains that I Need to Enter Sync Passphrase (But I've Forgotten It)
If you no longer have access to your custom passphrase, you’ll need to reset sync:
(link to google product forms)
- If your synced data (bookmarks, apps, etc) is available on your local computer, sign in to your Google Dashboard. (There will often be a link on the box)
- In the Chrome Sync section, click Stop sync and delete data from Google. This step will remove the data from Google’s servers. The data on your local computer won’t be affected.
- Wait a few minutes before signing in to Chrome and re-enabling sync on your computer.
(link to google product forms)
Making Personalized Cross-References Only in Apps
{Personal note} Right now, you can only make links to other scripture verses only with mobile apps, not the desktop site.
Steam Not Seeing the Internet
Sometimes in order to get Steam to work, you need to have a browser session opened first, then Steam will connect to servers to login. Otherwise, it will complain that you are not connected to the internet, especially when you are trying to login. (This could be an effect of Safe Eyes controlling the networking stack, or the Asus router's NAT, or some other stupid glitch).
Notes on Ways to Capture Bash Session
To capture a bash session, try the following methods:
1. Capture session with script:
2. Capture stdout, stderr with
3. Capture PuTTY Session
Can also capture screen history in putty by right clicking the top of the putty window and selecting "Copy All to Clipboard" (then save using your text editor of choice)
1. Capture session with script:
#> script -f
2. Capture stdout, stderr with
$> bash command 2>&1 | tee output.txt
3. Capture PuTTY Session
Can also capture screen history in putty by right clicking the top of the putty window and selecting "Copy All to Clipboard" (then save using your text editor of choice)