Unix/Linux Go Back    


Fedora is an operating system centered on the Linux open source kernel and is developed by the community-supported Fedora Project. Fedora is sponsored by Red Hat. Fedora contains software distributed under a free and open-source license. Fedora focuses on innovation, integrating and adopting new technologies and working closely with various Linux communities. The default desktop in Fedora is the GNOME desktop environment and the default user interface is the GNOME Shell. Other desktop environments include KDE Plasma, Xfce, LXDE, MATE and Cinnamon. Security is an important aspect of Fedora with one specific security feature, Security-Enhanced Linux, implementing a variety of software security policies, including mandatory access controls.

Xrandr on startup - Fedora 19, VMWare Fusion

Fedora


Tags
fedora, linux, startup script, vmware fusion, xrandr

Closed    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 04-23-2014
jaykayen jaykayen is offline
Registered User
 
Join Date: Apr 2014
Last Activity: 23 April 2014, 1:45 AM EDT
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Tools Xrandr on startup - Fedora 19, VMWare Fusion

I've tried following multiple procedures from various sites but can't seem to get this figured out. There was another thread on here about the same thing but I couldn't figure out how to apply it to my situation. This is my first time on Linux so I'm just learning.

I am running Fedora 19, Cinnamon DE in a VM using VMWare Fusion on a Retina MacBook Pro. I checked the box in VMWare's settings to "Use full resolution for Retina Display" because without it, the display is fuzzy and just plain horrible. The problem, though, is that whenever I login to Linux, the resolution switches to 2560x1600 and everything is just too small. So I switch the res back to 1680x1050 where I like it but the next time I startup the machine, the resolution is back to 2560x1600. So at first I created a bash alias like so


Code:
alias res="xrandr --output Virtual1 --mode 1680x1050 --rate 60"

and it works. But I can't figure out how to automatically run this when I login. I've tried placing the following script in /etc/init.d/ :


Code:
#!/bin/sh
exec /usr/bin/xrandr --output Virtual1 --mode 1680x1050 --rate 60

but this doesn't do anything. The file is named "screenres" and has permissions "-rwxr-xr-x".

I think there may be a problem with using VMWare Fusion though. It seems like the resolution is low until after I login. Once I login, the resolution seems to switch to the correct settings for a moment (I can tell by the size of the mouse pointer) but before the black screen goes away, the resolution switches to 2560x1600.

I'm just lost as to what to do. Might anyone have some suggestions or advice for me?
Sponsored Links
    #2  
Old Unix and Linux 05-04-2014
bakunin bakunin is offline Forum Staff  
Bughunter Extraordinaire
 
Join Date: May 2005
Last Activity: 26 May 2017, 2:41 AM EDT
Location: In the leftmost byte of /dev/kmem
Posts: 5,426
Thanks: 100
Thanked 1,502 Times in 1,116 Posts
Quote:
Originally Posted by jaykayen View Post
I've tried placing the following script in /etc/init.d/ :


Code:
#!/bin/sh
exec /usr/bin/xrandr --output Virtual1 --mode 1680x1050 --rate 60

but this doesn't do anything. The file is named "screenres" and has permissions "-rwxr-xr-x".
The problem is: nobody tells anybody to run that script at startup. I suggest you read the manpages of regarding "runlevels" and "init" to get a better understanding about how the startup process of a *ix-system works (notice that there are 2 fundamental layouts, "SysV" and "BSD").

To solve your problem: put (a link to) the script into "/etc/rcN.d", and name it Snn where "nn" is a two-digit number and "N" is the number of the runlevel whichs start you want to trigger the script. Or you can write a configuration file for init and place it in "/etc/init.d". Read the man page for init(5) to find out which format this has to be.

With Fedora/CentOS/RedHat you can also use the "chkconfig" utility to automatically place start/stop-scripts for arbitrary services into the various rc-directories. In this case you would have to change your script to accept "start", "stop" and "status" as parameters and create a pseudo-service from it.

I hope this helps.

bakunin

Last edited by bakunin; 05-04-2014 at 09:32 PM..
Sponsored Links
Closed

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Fedora on VMware intranslation Linux 5 05-28-2013 09:01 AM
xrandr imagining things cokedude UNIX for Advanced & Expert Users 2 07-07-2012 11:33 PM
xrandr: cannot find crtc for output VGA1 cokedude UNIX for Advanced & Expert Users 0 06-02-2012 03:47 PM
Fedora startup script help cokedude Red Hat 6 06-28-2011 11:10 PM
VMware crash on startup qf_woodfox Ubuntu 1 05-11-2011 05:57 AM



All times are GMT -4. The time now is 08:44 PM.