Sponsored Content
Operating Systems Linux Fedora Simple login script in openSuSe Post 302704729 by whitenight639 on Saturday 22nd of September 2012 11:51:10 PM
Old 09-23-2012
Simple login script in openSuSe

Hi guys,

Ok so I'm basically trying to run a script on loging or after everything else has started up, I've done so much googling my head is spinning I don't understand the which file I have to edit with the details of my script,

In suse there is no etc/profiles folder its daemonised so its /etc/profiles.d and I don't understand if this matters?

I've read and looked in various profile rc and bash_rc type files and I'm so confused about the differences between them, I understand there's interactive and normal shells but I don't get what is actually started in the last runlevel or after log in, (or is it just started when an actual terminal is opened?)



Also I've read about this skeleton file in /etc/init.d that you can use to create a service / daemon but that's far too complicated all I need to do is to run the following shell script when I log in:

Code:
#!/bin/bash
vgscan
vgchange -ay
mount /dev/mapper/vg_codename-lv_root /home/whitenight639/fedora


basically I have an encrypted logical volume on with all my music on I just want this to automount and I've played with fstab and cryptab and It will not mount during boot as some of the required kernel modules or programmes arn't started at that time, also It won't automount through dolphin I have to run the above commands everytime I have rebooted. Some of the media on this drive is shared as a samba share and sometimes when I login i forget to run those commands and mount the drive so my shares arnt visible on the network.

please help
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

something simple, but i have no idea: a login issue

Hi all, I have a problem not really dramatic but realyl annoying: i've got a groups of users who logon a sunos 2.3 box via a windows telnet client (KEAI, but this is not the problem). they login as perso1 and password. It takes a very very very long time to get in. If i log on the same box... (2 Replies)
Discussion started by: penguin-friend
2 Replies

2. Web Development

Simple Login page

Hi all, I am stepping into web-development as a hobby point of view. I am using WAMP server & have created the initial page & SQL set-up too. My problem is, I was able to login to a page/redirect to a page though I haven't specified my username & password. I thought of using both... (2 Replies)
Discussion started by: gameboy87
2 Replies

3. Shell Programming and Scripting

OpenSuse Login Screen

I'm Not really sure if this is the best place to ask this question but logic tells me it is :P I'm Trying to change the login screen for OpenSuse the green Screen for something a little bit more of my liking, and I think the only way to do it perfect and right is through the command Line, do not... (1 Reply)
Discussion started by: JuankyKong
1 Replies

4. Shell Programming and Scripting

Help making simple perl or bash script to create a simple matrix

Hello all! This is my first post and I'm very new to programming. I would like help creating a simple perl or bash script that I will be using in my work as a junior bioinformatician. Essentially, I would like to take a tab-delimted or .csv text with 3 columns and write them to a "3D" matrix: ... (16 Replies)
Discussion started by: torchij
16 Replies

5. SuSE

Installed OpenSuse 12.1 w/KDE - system freezes at graphical login

Hi, I installed OpenSuse 12.1 on my Dell 690 (X2 dual core Xeon 2.66GHZ, 8G RAM 667 FBDIMM quad channel, 500G at striping RAID (2X 250G SATA), nVidia Quadro FX 3400). All installation was smooth, took less than 15 minutes. But when I'm trying to login, instead of showing me the desktop... (1 Reply)
Discussion started by: netwalker
1 Replies

6. Shell Programming and Scripting

Simple check login script

Hello, I just started with shell and i am doin simple script to check if certain user is logged in. Script takes 3 args. name sleep time and quit value if there is q for quit then date and user name is printed to file, not to screen. so far i have got this... login() { while :... (3 Replies)
Discussion started by: shelllo
3 Replies

7. Linux

How to execute a simple select script using a shell script?

Hi team, I have two select statements and need to run them using SYSDBA user select * from temp_temp_seg_usage; select segment_name, tablespace_name, bytes/ (1024*1024) UsedMb from dba_segments where segment_name='TEMP_TEMP_SEG_USAGE'; Need to run this using a shell script say named... (1 Reply)
Discussion started by: pamsy78
1 Replies

8. Shell Programming and Scripting

Script as login shell (passing args to login shell)

Hello all, for security reasons my compagny imposes that my script be launch remotly via ssh under the users login shell. So serverA launches the ssh command to serverB which has a local user with my script as a login shell. Local script works like a charm on his own. serverB$ grep... (20 Replies)
Discussion started by: maverick72
20 Replies

9. UNIX for Dummies Questions & Answers

Simple Login script

Hi Guys Im new to bash script, trying hard to learn and enjoying this process. However i'm pretty much stumped, so i will put my problems out there. In the hope someone can help me. I am trying to make a bash script that allows users of a Unix system (with little knowledge under the hood ) to be... (12 Replies)
Discussion started by: willo
12 Replies

10. Shell Programming and Scripting

Permission denied running shell script in opensuse

Hello, I am having an odd problem in open suse 12. I have a shell script and when I try to run it, I get "permission denied" The permissions from ls -l are, -rw------- 1 user1 users 25904 Jan 10 16:26 script.sh I have tried to change the permissions in dolphin but this does not change the... (5 Replies)
Discussion started by: LMHmedchem
5 Replies
script(1)							   User Commands							 script(1)

NAME
script - make record of a terminal session SYNOPSIS
script [-a] [filename] DESCRIPTION
The script utility makes a record of everything printed on your screen. The record is written to filename. If no file name is given, the record is saved in the file typescript. See WARNINGS. The script command forks and creates a sub-shell, according to the value of $SHELL, and records the text from this session. The script ends when the forked shell exits or when Control-d is typed. OPTIONS
The following option is supported: -a Appends the session record to filename, rather than overwriting it. NOTES
script places everything that appears on the screen in filename, including prompts. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ |CSI |Enabled | +-----------------------------+-----------------------------+ SEE ALSO
attributes(5) WARNINGS
script can pose a security risk when used in directories that are writable by other users (for example, /tmp), especially when run by a privileged user, that is, root. Be sure that typescript is not a link before running script. SunOS 5.11 30 Jan 2004 script(1)
All times are GMT -4. The time now is 04:06 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy